tribe_events being inserted into WP_Query args
-
I am working on a plugin that will get the last 4 posts from my site. I have setup the following WP_Query to do this:
$args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 4, 'orderby' => 'date', 'order' => 'DESC', ); $posts = new WP_Query($args);
When that executes, I am seeing posts of type ‘tribe_events’ and ‘post’. I can see that somehow the ‘tribe_events’ post type is getting inserted into my SQL query as well.
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type IN ('post', 'tribe_events') AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date DESC LIMIT 0, 4
How is the post type ‘tribe_events’ getting inserted into my custom query? I only see this happening on the front end of my site too. When I disabled The Events Calendar plugin, the issue went away. I tried different themes and this didn’t help either.
The Events Calendar version 6.0.4
Wordpress version 6.1.1
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘tribe_events being inserted into WP_Query args’ is closed to new replies.