With WordPress Popular Posts, you can show your visitors what are the most popular entries on your blog.
wordpress-popular-posts folder to the /wp-content/plugins/ directory.header.php and make sure that the <?php wp_head(); ?> tag is present (should be right before the closing </head> tag).That's it!
If you want to use WordPress Popular Posts on your pages (a "Hall of Fame" page, for example) please use the shortcode [wpp]. Attributes are optional, however you can use them if needed. You can find a complete list of the attributes WordPress Popular Posts currently supports at your wp-admin > Settings > WordPress Popular Posts page.
Usage:
[wpp]
[wpp attribute='value']
Example:
[wpp range=today stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]
wpp_get_mostpopular
Due to the fact that some themes are not widget-ready, or that some blog users don't like widgets at all, there's another choice: the wpp_get_mostpopular template tag. With it, you can embed the most popular posts of your blog on your site's sidebar without using a widget. This function also accepts parameters (optional) so you can customize the look and feel of the listing.
Usage:
Without any parameters:
<?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular(); ?>
Using parameters:
<?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular("range=weekly&order_by=comments"); ?>
For a complete list of parameters (also known as "attributes"), please check your wp-admin > Settings > WordPress Popular Posts page.
wpp_get_views()
The wpp_get_views template tag retrieves the views count of a single post since the plugin was installed. It only accepts one parameter: the post ID (eg. echo wpp_get_views(15)). If the function doesn't get passed a post ID when called, it'll return false instead.
Usage:
<?php if (function_exists('wpp_get_views')) { echo wpp_get_views( get_the_ID() ); } ?>
Requires: 2.8 or higher
Compatible up to: 3.2.1
Last Updated: 2011-12-5
Downloads: 294,981




