hello
I did manage to resolve the issue in the interest of helping others what I did was
<?php
// Switch Statement to display Events sorted by Venue on different location pages //
global $wp;
$current_slug = add_query_arg( array(), $wp->request );
switch ($current_slug){
case “locations/camelot”;
echo do_shortcode(‘[tribe_events view=”photo” venue=”camelot”]’);
break;
default;
$events = tribe_get_events( [
‘start_date’ => ‘today’,
‘end_date’ => ‘+1 week’,
‘posts_per_page’ => 5,
‘featured’ => true,
] );
}
?>
So pretty much the part I was looking for was the echo do shortcode bit. Also opted for a case statement as opposed to if else for speed
-
This reply was modified 2 years, 2 months ago by mfuark.