In case it helps someone else, this was a much easier fix than I thought. I simply added the category ids to exclude to the query_posts argument, e.g., query_posts("s=$s&cat=-415,-504&posts_per_page=-1");
Related Posts:
- exclude category from get_posts?
- Exclude the category from the WordPress loop
- Exclude certain category from latest updates
- Exclude categories from Loop, queries, widgets, post navigation
- List posts by category exclude current post
- wp_list_categories exclude not working
- Excluding a category from next and previous post links
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- How to exclude categories from recent posts, recent comments & category widgets?
- Exclude a category from the filed under list only on some templates
- How to exclude posts from a category when using this particular format
- Exclude category from Tag Template
- exclude post from displaying in loop if it is in a category, but not in many categories
- I need to create a search form that will display search results from specific category
- Exclude Posts From Specific Category from Next and Previous post links
- Query Posts Exclude Entire Category
- Exclude category from fucntion
- WordPress category widget only show categories with children
- wp_list_pages() exclude category
- Exclude category from query
- Functions.php: Exclude Category from “Blog”
- Woocommerce filter function not updating
- wp_list_categories not excluing multiple ids
- How to exclude posts from category posts count
- Exclude category from foreach loop
- Have posts that belong to multiple categories, exclude some categories from homepage
- Exclude all subcategories in the_category (post)
- I need to exclude from a query a category and a few custom taxonomies
- Exclude categories by ID
- Homepage custom recent news
- Exclude the category in WordPress
- How can I exclude a category from the main loop with the category name & not ID?
- User level categories
- Exclude category from drop down list form
- exclude certain categories form archive widget
- How to remove an item from a custom Walker_Nav_Menu
- Exclude a category and post_type from wp_query
- How can I exclude a particular category from my WordPress Page 1 and Page 2?
- Exclude category from WP_Query args not working
- Displaying Category in sidebar post widget but not in the loop on home
- Category menu that filters out empty categories
- Problems with explode [closed]
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- How to have a category not show up in query post with page panigation?
- Customize category query in widget
- Call function on a single page
- Excluding cateory not working on my site. how to solve this? [closed]
- How to define category ID in an array?
- Get category ID from category slug (not working)
- How do I remove “Uncategorized” from posts with more than 1 category?
- Filter by post category in Media Library
- Custom post types with their own permalink structure
- Send an email when custom post type category is changed
- Display the deepest child category from Category X (in loop)
- Exclude subcategories from the url
- Why adding Categories does not auto refresh in Backend while using my custom theme?
- Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?
- Remove specific category from a post
- Search by word, category, tag, author
- How to hide certain categories in wordpress dashboard?
- How to filter archives both by category and tag?
- How i can let users add notes to my posts
- Single_cat_title() print the title before text
- Sort posts by post_type in category.php template
- Why would in_category only return one post in a specific category?
- Is it possible to have WordPress not recognize category URLs?
- getting content from main domain to sub-domain using category and WP_Query
- Force a user’s posts category
- Checking for two categories in query_posts
- get_the_categories filter returns an empty array
- WordPress admin categories sort show is wrong
- Needing a snippet for listing category specific tags
- Displaying Categories and Sub Categories
- How to list categories within tags?
- get_next_post set the category
- WordPress URL Rewrite for dynamic and customized URL
- Targeting Parent Category Pages
- Change every post background based on category
- Get category’s parent category while using get_the_category_list
- Loop doesn’t exclude the specified category in home page
- How to show the category of custom taxonomy
- Remove parent category from child/sub-category page URL in WordPress
- Add code to header based on category for specific posts?
- Can I prioritize post categories for choice for breadcrumb trail?
- Disable Category Taxonomy
- How do you get sticky posts to work with categories?
- A different permalink structure for different categories
- How to make product image inherit from category image
- Is it possible to set up blog categories without changing permalink structure
- How to display categories image in loop homepage WordPress
- How to “remove” WordPress categories UL and make the list loop in a horizontal line?
- How do I rewrite a single category link to point to a custom page?
- Add subcategories posts to the counts column at the admin’s categories list
- Default category isn’t saved in database
- Display related posts with same category or same tag return blank
- Get posts from 2 or more categories
- date.php shows all posts. how to fix it?
- Help with Wp + Mixitup code
- show posts from some category and sort by advance custom field
- How to show monthly archive posts?