The default WordPress search results page is noting but to show you the total results as per your search keywords. You can spice this page up a bit by showing the total search count like
4 Results found or something like this….
Just you need to add some codes and it will look like the image below.
The main code which do this action is:
<?php $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; ?>
Now what you will have to do is as follows.
Step 1: Open search.php page inside your theme folder. Remove the existing search query and put the following code.
An easier and better way to do this is …
found_posts; ?>
That saves an extra database call.
Hmm, not all code is shown. Again, without code tag:
found_posts; ?>
global $wp_query;
echo $wp_query->found_posts;
Thank you Jasper, you are right.