该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Results count

描述

Results-Count is a very simple plugin that does exactly what it says on the tin & will count the number of posts that result from operations in WordPress such as a search, viewing a category, or viewing a monthly archive etc.
The purpose of the plugin is to allow you to insert text at the top of your archive & search results pages saying something like: results: 1-10 of 43. It serves the dual purpose of showing the number of results, as well as showing what page you are currently on within those results.

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/ e.g. http://www.elginism.com/archives/acropolis/

If you have any queries or find bugs, could you please contact me via the contact form on http://www.elginism.com

Revision history

  • Version 0.5
    Fixes possible XSS vulnerability.

  • Version 0.4.2
    Adds support for Author archives.
    Fixes bug where output does not display correctly when there are over 999 results.

  • Version 0.4.1
    Fixes incorrect display for single day archive pages.

  • Version 0.4
    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.

  • Version 0.3
    Adds compatibility with tags (introduced in WordPress 2.3), so headers will now show up for tag archive results.

  • Version 0.2
    Updates the plugin to work with version 2.3 & higher of WordPress.

  • Version 0.1
    Initial public release of the code in plugin form.

屏幕截图

安装

  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 wp_searchheader()?>
<?php endif; ?>

Which will then automatically check for the plugin before trying to execute it.

评价

此插件暂无评价。

贡献者及开发者

「Results count」是开源软件。 以下人员对此插件做出了贡献。

贡献者

帮助将「Results count」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志