Support

Account

Home Forums General Issues Exclude posts Reply To: Exclude posts

  • Old post I know but it popped to the top due to spammers.

    If anyone is looking or this you can add a filter that will run on just a specific query by adding the filter before your query and then removing it after.

    
    add_filter('pre_get_posts', 'my_pre_get_posts');
    // do your query
    remove_filter('pre_get_posts', 'my_pre_get_posts');