Conflict with Announcer Plugin
-
Hello TEC team!
Thank you for the good work you do on the TEC plugins.
We recently encountered a conflict with the Announcer plugin where the all events were being displayed on /events/tag/ pages. I contacted the devs over there and they are saying that the issue is related to how TEC is modifying a query that gets all announcements. They provided the code below as a temporary fix and asked that I contact you about the issue.
Here is the code they provided:
function modify_announcements_query($query) {
$post_types = $query->get(‘post_type’);
if(in_array(‘tribe_events’, $post_types) && in_array(ANCR_POST_TYPE, $post_types)){
$query->set(‘post_type’, ANCR_POST_TYPE);
}}
add_action(‘pre_get_posts’, ‘modify_announcements_query’, 1, 999);Have a great day and thank you!
- The topic ‘Conflict with Announcer Plugin’ is closed to new replies.