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');
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.