Linux 软件免费装
Banner图

Easy Popular Posts

开发者 christopherross
thisismyurl
更新时间 2016年4月6日 22:24
捐献地址: 去捐款
PHP版本: 3.2.0 及以上
WordPress版本: 4.1.0

标签

post widget posts plugin sidebar comments theme php popular posts code best popular post-plugins most popular most-viewed

下载

2.0.0 2.3.5 2.5.6 2.6.5

详情介绍:

An easy to use WordPress function to add popular posts to any WordPress theme. You can also include the the list in a post using a shortcode [thisismyurl_easy_popular_posts] or as a widget. This plugin is maintained by Christopher Ross, http://thisismyurl.com or you can find him on Twitter at http://twitter.com/thisismyurl/

安装:

To install the plugin, please upload the folder to your plugins folder and active the plugin.

屏幕截图:

  • Screenshot of Widget

常见问题:

How do I display the results in my PHP code?

<?php thisismyurl_easy_popular_posts(); ?>

How do I display the results in my posts?

Include the shortcode [thisismyurl_easy_popular_posts] in any post or page.

How do I include the results as a widget?

On your Widgets page, simply drag and drop the widget to your sidebar!

General results

Without passing any parameters, the plugin will return ten results or fewer depending on how many posts you have. <?php thisismyurl_easy_popular_posts(); ?>

Specific number of results

If you would like to return a specific number of results as your maximum: <?php thisismyurl_easy_popular_posts('count=10'); ?> =Altering the before and after values=< By default the plugin wraps your code in list item (<li>) tags but you can specify how to format the results using the following code: <?php thisismyurl_easy_popular_posts('before=<p>&after=</p>'); ?> =The Order=< You can now change the order of the results using ASC, DESC or RAND to return the results in ascending, descending or random order. <?php thisismyurl_easy_popular_posts('order=ASC'); ?>

Echo vs. Return

Finally, if you'd like to copy the results into a variable you can return the results as follows: <?php thisismyurl_easy_popular_posts('show=false'); ?>

Combining Arguements

If you'd like to call multiple arguments you can do so by separating them with a & symbol: <?php thisismyurl_easy_popular_posts('show=false&order=ASC'); ?>

更新日志:

2.6.5 2.6.0 2.5.6 2.5.5 2.5.2 2.5 2.1.1 2.1 2.0 1.7.3 1.7.2 1.7.1 1.7 1.6.5 1.6.4 1.5.4 1.5.2 1.5.1 1.5.0 1.1.5 1.1.0 1.0.0 0.1.0