Hello,
Is it possible to exclude recurring events from a loop?
I currently have the following-
<?php
global $post;
$all_events = tribe_get_events(array(
‘eventDisplay’ =>’upcoming’,
‘offset’ => 1,
‘posts_per_page’=> 8,
‘tax_query’=> array(
array(
‘taxonomy’ => ‘tribe_events_cat’,
‘field’ => ‘slug’,
‘terms’ => ‘highlights’
)
)
));
foreach($all_events as $post) {
setup_postdata($post);
?>
..loop stuff
That is totally possible! All recurring events have set the post meta “_EventRecurrence” to something other than a blank value. So you could simple add meta section to your query where the meta key _EventRecurrence == “”. More info on custom meta queries can be found in the codex.
Does that answer your question? Please let me know if it helped. Cheers!
Since this topic has gone for a spell without a response I am going to archive it. If you do need anything else please feel free to open a new topic. Cheers!
– Brook
Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
The topic ‘Exclude Recurring Events from custom loop’ is closed to new replies.