Hi,
I was exactly looking for a piece of code to limite the search to certain categories. Your code works well !!
<?php if( is_search() ) :
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("s=$s&paged=$paged&cat=1,2,3");
endif; ?>
But, I want the category to be dynamic :
From the web page archive.php, I want to store the current category (something like $my_category = “current categorie”) and call this variable in the search result web page search.php (query_posts(“S= …” cat=”.$my_category). As I am a dummy in PHP langage, I don’t know what I need to write …. could you help me?
Thanks in advance