I want one image in header.php to change for different pages.
The function in header.php looks like that:
if(is_archive()): //change image to "Archives" endif; if(is_404()): //change image to "404" endif;
Now, is it possible to check if page is the search page AND what's the search string AND how many posts were found?
So what I want to do is basically:
if(is_search()): //change image to "Search" AND echo %s endif; if(is_search_empty()): //yes I made this up //change image to "Nothing found" AND echo $ endif;
Is it even possible outside the search.php page loop?