Posted By

dan_hoerr on 07/13/11


Tagged

search wordpress results


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

srdjan


Wordpress search results header


 / Published in: PHP
 

prints "We found 'N' result(s) for 'QUERYSTRING'"

  1. <?php
  2. global $wp_query;
  3. $total_results = $wp_query->found_posts;
  4. ?>
  5. <h3>We found <?php echo $total_results; ?> result<?php echo $total_results == 1 ? '' : 's' ; ?> for "<?php the_search_query(); ?>"</h3>

Report this snippet  

You need to login to post a comment.