Recent Post Views
This plugin requires the WP-PostViews plugin to be installed and setup to work correctly. (https://wordpress.org/extend/plugins/wp-postviews/) This plugin displays a widget in the sidebar with the most recently viewed posts over the last 2 days, the number of times they were viewed, a link to each,
This plugin requires the WP-PostViews plugin to be installed and setup to work correctly. (https://wordpress.org/extend/plugins/wp-postviews/)
This plugin displays a widget in the sidebar with the most recently viewed posts over the last 2 days, the number of times they were viewed, a link to each, and images corresponding to whether they were “hot” posts or not (calculated as a percentage of the most viewed post).
A closer look.
- 01Upload recent-post-views.php to the /wp-content/plugins/ directory.
- 02Activate the plugin through the ‘Plugins’ menu in WordPress.
- 03Put the post in the sidebar via the ‘Widgets’ menu, save a title for the widget.
- 04Use the shortcode [recentpostviews] in your pages and posts. See FAQ’s for more info. Accepts “cat”, “posts”, and “days” as inputs.
Frequently asked questions.
How do I use the shortcode?
The basic format is [recentpostviews], which will by default show a list of the top 7 posts, from all categories, over the last 2 days. Options are “cat”, “posts” and “days”. * “cat” is the category ID. * “posts” is the number of posts you want to display. * “days” is the number of days back you want the shortcode to query, as in “over the last (n) days.”
Example: [recentpostviews cat=”5″ posts=”10″ days=”3″] *This would display the 10 most recent posts from category 5 over the last 3 days.
If you’re not getting any results for the shortcode, try changing the number of days.
By default, the “hotlevel” for posts is 75% or .75 in the shortcode. E.g., a post will not show up as “hot” unless it is greater than or equal to the post with the most number of views over the same time frame.