Support » Plugin: Ultimate Category Excluder » Exclude post from WP API

  • Resolved zubovd


    I found that in version 1.5 the $query->is_main_query() condition was removed and now records are also excluded from WP API requests.

    if i add to IF section – $query->is_main_query()
    then everything is fine as before.

    fix this please, because I need to exclude posts on the front page, but not in the REST API.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marios Alexandrou


    What’s a design flaw for some people is a feature for others. However, if you’d like to submit code that enables the user to toggle functionality on and off so that the plugin satisfies all users, feel free to do so.

    This is a change that BROKE our web site which relies on the WordPress API. Because just like that the default post call started to exclude our categories that are excluded from homepage. Previous behavior was that posts were NOT excluded from the API calls. You can’t just decide to change the behavior without offering a way to turn it off if it’s not backward compatible.

    Furthermore it seems there’s something wrong because even when we completely delete category excluder from our plugins the API still excludes the category that was excluded with category excluder! So far we did not find a way to get the API post call to return posts from ALL categories as it always did.

    Where do you tell wordpress to exclude the categories from the API call? And why would this setting remain even after removing category-excluder?

    Same request for me here:

    Fix this please, because I need to exclude posts on the front page, but not in the REST API and by doing so you broke our web sites.

    Plugin Author Marios Alexandrou


    The plugin doesn’t interact with the WordPress API specifically. All it does is check things like is_home, is_feed, is_search, and is_archive.

    In addition, if the plugin is disabled and the problem persists, then I’d say the problem isn’t related to the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude post from WP API’ is closed to new replies.