• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Exclude Category of Posts From Showing On Search Results Page On Your Site

This code excludes all posts in one specific category from displaying in on your sites search results page from using the search widget native to WordPress.

Simply add the code to the end of your child themes functions.php file.

You’ll also need to swap out the category id with your own.

If you want to exclude multiple categories, seperate the category I.D’s with a comma.

Here’s the code for logged in members:

Register for full access

Related Tutorials

  • Exclude Terms From Search Results in WordPress

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags