• Resolved Philipp Bammes

    (@tyrannous)


    Hi,
    I noticed the plugin adds the query arg post__not_in to all queries using the pre_get_posts filter on frontend. That overwrites queries which use post__not_in too.
    Line 350 in 404page.php.

    Please make this filterable. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Peter Raschendorfer

    (@petersplugins)

    Thanks für pointing to this. You are right, the set function does not add query args, it overrides them. I’ve solved this by checking if post__not_in already exists and adding a new value if so. So it’s not necessary to make it filterable.

    Which plugin are you talking about? I’d like to test it.

    Peter

    Thread Starter Philipp Bammes

    (@tyrannous)

    Thanks for getting back to me.

    I encountered the issue while modifying the WP_Query on an custom archive page.

    There are many plugins available which alter the query. You may try Simply Exclude for example.

    Plugin Contributor Peter Raschendorfer

    (@petersplugins)

    Could you please test the current dev version which can be downloaded here: https://downloads.www.ads-software.com/plugin/404page.zip

    Thanks,
    Peter

    Thread Starter Philipp Bammes

    (@tyrannous)

    I had to switch to a different 404 plugin because of my project’s approaching deadline.
    So I can’t test this anymore, sorry.

    Plugin Contributor Peter Raschendorfer

    (@petersplugins)

    That’s a pity. Maybe at some point. It worked in my tests.

    Marked topic as resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Overwrites WP_Query args’ is closed to new replies.