Skip to content

Incompatible with events post type from Events Manager #14

@stevygee

Description

@stevygee

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions