This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Search By Category


To help users find the posts they’re looking for faster, this plugin allows them to search for articles or posts within certian categories, cutting back on the number of results the user needs to crawl through to find the article they want.

Change log

– Fixed automatic category reselect

– Fixed inall_exclude use case failure

– Removes leftover debug code

– Exclude from categories from “in all categories”
– No drop-down menu when using “only_cat” parameter
– Added sbc() controls
– Added shortcode controls

– Converted options storage from seperate rows to one array
– Updated code to be more standardized and readable

– XSS security fix (by Manuel Razzari –

– Search box retains searched value (by Manuel Razzari)
– Default style usage on/off fix (by Manuel Razzari)

– Dropdown now automatically selects current category if viewing an archive

– Fixed settings saving issue

– Included Shortcode: [sbc]

– Added security fixes
– Removed some excess code

– Default text
– Custom styling

Beta 3
– Search Text
– Exclude Child categories
– search box auto empties and refills if nothing entered

Beta 2
– First complete working version
– Hide Empty
– Focus
– Exclude Categories

Beta 1
– First working version
– Category exclustion from drop-down list isn’t functional

Alpha 1
– All functions are present but independent


List of arguments in order
* focus – replaces “In all categories”
* hide_empty – 1 means true, 0 means false
* search_text – replaces “Search for…”
* only_cat – category name/slug/ID [removes dropdown list]
* excluded_cats – must be category IDs seperated by commas (ex: 1,2,3) / removes categories from dropdown list
* exclude_child – 1 means true, 0 means false
* inall_exclude – must be category IDs seperated by commas (ex: 1,2,3) / removes categories from “in all categories” and dropdown list

If you don’t want to customize a setting, use: null, 0, or ”.


  • SBC From with custom styling
  • SBC config page


  1. Download, unzip and upload to your WordPress plugins directory
  2. activate the plugin within you WordPress Administration
  3. Go to Settings > Search By Category
  4. Use the following code in your Theme:
<?php if(function_exists('sbc')){ 
} else { ?>
    // Your regular form code goes here
<?php } ?>




Read all 4 reviews

Contributors & Developers

“Search By Category” is open source software. The following people have contributed to this plugin.


Translate “Search By Category” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.