-
Notifications
You must be signed in to change notification settings - Fork 80
1. Using WPP on posts & pages
Shortcodes are macro codes that allow users (that's you!) to insert bits of predefined functionalities into post/page content.
WordPress Popular Posts takes advantage of this feature so you can showcase a list of popular posts on, for example, a Hall-of-Fame page where your visitors can gain direct access to your best contents.
Out of the box (that is, using it without parameters) the [wpp] shortcode lists the most viewed posts (up to 10) within the last 24 hours. The shortcode, however, includes a decent amount of parameters so you can customize it according to your needs - see Settings > WordPress Popular Posts > Parameters for more details.
For example, this would display the top 5 viewed posts from the last 7 days:
[wpp range="last7days" limit=5 stats_views=1 order_by="views"]
And this would output the 10 most commented posts from the last 30 days:
[wpp range="last30days" stats_comments=1 order_by="comments"]
For a complete list of parameters & additional examples, please visit Settings > WordPress Popular Posts > Parameters.