mb-relationships
mb-relationships copied to clipboard
Incompatible with events post type from Events Manager
I wasn't able to query connected posts with post type 'event' from the plugin Events Manager. The relationship can be set when editing the event, but WP_Query always returns zero results. I checked the SQL statement and part of it said:
AND wp_posts.post_type IN ('post', 'page', 'attachment', 'product')
Obviously it does not include 'event', so I had to hook into 'posts_where' to modify this part of the SQL statement and add it back in.
I'm not sure if this is due to how the 'event' post type is set up in EM?