wordpress snippets last updated   : April 22, 2014
we now have 631 snippets

Exclude cat from search

wordpress snippet

Adding this PHP code just above the loop in your wordpress search.php template. Make sure to place a - minus before the category ID you wish to exclude.

snippet :  PHPcopy
<?php
          query_posts($query_string . '&cat=-3');
?>

jqsnipp.com | we just launched jquery snippets website