/ Published in: PHP

prints "We found 'N' result(s) for 'QUERYSTRING'"
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php global $wp_query; $total_results = $wp_query->found_posts; ?> <h3>We found <?php echo $total_results; ?> result<?php echo $total_results == 1 ? '' : 's' ; ?> for "<?php the_search_query(); ?>"</h3>
Comments
