I know that this site is running on Drupal, but I have another site that runs on Wordpress.
Because this site is based mainly on collated articles, it contains a lot of text, meaning that searches often return many pages of results, particularly for common search terms. On search engines such as Google, it says at the top of results pages something like: Results 1 - 100 of 172. I set out to create a plugin that would do the same thing with Wordpress.
For an example of the plugin in use, look at the top of any of the archive or category pages at http://www.elginism.com/archives/acropolis/, an archive with multiple pages of results.
As I haven't come across a similar plugin, I'm releasing it for free under the GPL license, for anyone else who may find it useful.
If you have any queries or suggestions for how the plugin could be improved, please could you add them to comments on this page.
To get the plugin, use the download link at the end of this page.
1. Upload `results-count.php` to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Place `<?php wp_searchheader()?>` in your templates, where you want the text generated by the Results Count plugin to occur.
If you want to ensure that the plugin is installed first to stop errors with the template when it is disabled, then instead use the code:
<?php if (function_exists('wp_searchheader')) : ?>
<?php endif; ?>
Which will then automatically check for the plugin before trying to execute it.
Adds support for Author archives.
Fixes bug where output does not display correctly when there are over 999 results.
Fixes incorrect display for single day archive pages.
Alters the text when there is only a single result on the page.
Corrects bug so that the correct text displays when there is only a single page of results.
Displays correct text when a year archive is shown rather than a month.
Tidied up text to fix some grammatical errors.
Various non-critical bugs fixed & old code tidied up.
Comments added in the html output to help error tracing, identifying the code produced by the plugin.
Adds compatibility with tags (introduced in Wordpress 2.3), so headers will now show up for tag archive results.
Updates the plugin to work with version 2.3 & higher of Wordpress.
Initial public release of the code in plugin form.
The latest version of the plugin can be downloaded from the plugin repository at Wordpress.org
The it here: