Skip to content

Instantly share code, notes, and snippets.

@spkellydev
Last active November 17, 2017 20:20
Show Gist options
  • Save spkellydev/93e284c5c4ae012f46382e4caca27dc6 to your computer and use it in GitHub Desktop.
Save spkellydev/93e284c5c4ae012f46382e4caca27dc6 to your computer and use it in GitHub Desktop.
<?php //Youtube Video block ---
echo do_shortcode('[vc_row][vc_column][vc_column_text][sl9_section section="video_block"][/vc_column_text][/vc_column][/vc_row]');
$current_blog_path = str_replace('/','',$current_blog_location->path);
switch_to_blog(1);
$query = new WP_Query(array(
'post_status' => 'publish',
'post_type' => 'max-success-story',
'tax_query' => array(
array(
'taxonomy' => 'tax-location',
'field' => 'slug',
'terms' => $current_blog_path,
),
),
));
while( $query->have_posts() ) : $query->the_post();
//get the id of tax-location to filter out any success stories not supplied to us
$ss_id = get_the_id();
$ss_id = get_post_meta($ss_id, '_yoast_wpseo_primary_tax-location')[0];
echo do_shortcode('[vc_row padding_top="" padding_bottom=""][vc_column offset="vc_col-md-offset-2 vc_col-md-8"][vc_column_text]
<h1 class="section-title">Check Out Our Members Results</h1>
<hr />
[/vc_column_text][/vc_column][vc_column width="2/3" offset="vc_col-sm-offset-2"]
[sl9_success_stories tags="' . $ss_id . '" type="carousel" number="10"][/vc_column][/vc_row]');;
endwhile;
restore_current_blog();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment