Is there a conditional tag (or a similar concept) that can tell me wether the search returned posts or not?
1 Answer
global $wp_query;
echo $wp_query->found_posts;
-
Or
if( have_posts() )
should pretty much do the same, ie. tell you if there are more than 0 posts returned in the query.– t31osCommented Jan 22, 2011 at 10:21