-
Notifications
You must be signed in to change notification settings - Fork 81
1. Using WPP on posts & pages
Shortcodes are macro codes that allow users (you, in this case) to insert bits of predefined functionalities into post content.
WordPress Popular Posts takes advantage of it so you can showcase a list of popular posts on, say, a Hall-of-Fame page where others (your visitors) can gain direct access to your best contents.
By default -that is, without any parameters- the [wpp] shortcode lists the most viewed posts (up to 10) within the last 24 hours. Fortunately, you can change that behavior by using parameters that not only allow you to change the default Time Range but also even the default markup.
For example, this:
[wpp range="weekly" stats_views=1 order_by="views"]
... would output the most viewed posts from the last 7 days.
And this:
[wpp range="monthly" stats_comments=1 order_by="comments"]
... would output the most commented posts from the last 30 days.
You can find a complete list of parameters via wp-admin > WordPress Popular Posts > Parameters.