• WStringer2

    (@wstringer2)


    Hi Paul,

    First off, thanks for the great plugin! It is such a convenient way for our editors to hide content from various parts of our site.

    I am having one issue that I could use some help with. We’re using custom post types with the following args:

    $args = array(
                'post_type'     => 'articles',
                'posts_per_page'=> 3,
                'post__not_in' => array(1234,4321),
                'orderby'       => 'menu_order',
                'order'         => 'ASC'
            );

    When “Simply Exclude” is active, “post__not_in” does not work. If I disable the plugin it works OK. I believe it has to do with the pre_get_posts filter, but I didn’t want to add another filter that might compete with yours. Do you have any recommendations for how I should solve this?

    Thanks for your time!

    Walt

    https://www.ads-software.com/plugins/simply-exclude/

Viewing 1 replies (of 1 total)
  • Plugin Author Paul Menard

    (@pmenard)

    @wstringer2,

    Apologies for not replying sooner. For some reason I’m not longer receiving emails from wp.org on forum threads. On to your issue…

    At what point are you using the $args in a query? It is quite possible there is some conflict between Simply-Exclude and your custom query args. I’ll double check the coding to ensure values like the ‘post__not_in’ arg element is merged and not replaced.

    P-

Viewing 1 replies (of 1 total)
  • The topic ‘post__not_in not working on custom post type’ is closed to new replies.