How to exclude category from WordPress search results

Sometimes you do not like to display post in specified category on WordPress search results, below is a code for excluding a category from WordPress search. this will work fine within the loop.

 
<?php
          query_posts("s=$s&cat=-90,-100&posts_per_page=-1");
?>

Related posts:

HTML5 page structure

HTML5 offers more powerful structure comparing to older versions of Html. There are many new …


Partner with Us

We are providing an exclusive partnership offer to individuals and companies who are interested in setting up their own web design & development company. For more information about how to partner with us, please contact us