Support

Account

Forum Replies Created

  • Hi Elliot,

    Thanks for your reply.

    While I understand your position, it seems as though the specific request is actually a tighter implementation of the search and shouldn’t negatively effect anyone since, as you said, it’s locked in with the IDs and is just returning posts that are within the user-specified settings.

    Do you foresee a problem that someone might encounter with this update that I might be missing?

    Thanks!

    -Matt

  • Hi Elliot,

    Thanks for the response!

    Yes, I agree — it’s perfectly reasonable to suspect that post__in would be enough. The conflict occurs with another plugin that handles Event custom post types.

    This events plugin uses the “pre_get_posts” method. During the process of using this method, the plugin will end up adding a tiny piece to the query if it has to do with a post_type that the plugin is responsible for. Ie, your query says “Give me all post types” and then the event plugin says “hey, that query has to do with events — so add on this event-related piece”. The end result is that the query doesn’t return anything because the event piece isn’t appropriate to be added in this case since it’s not really about events.

    I’ll be the first to admit that there’s probably something that could change in the event plugin to avoid this issue. Having said that, my guess is that ACF is more widely supported than the other and therefore, more likely to be updated. Plus, I figured the update actually made sense anyway to restrict the results to certain post_types. Especially, since it was already filtering to certain post_types anyway, it just wasn’t being that specific.

    What do you think?

Viewing 2 posts - 1 through 2 (of 2 total)