Both use the same bot-filtered counts as your dashboard. They add no tracking of their own, and the lists are cached for an hour so they stay fast.
Popular posts block
In the block editor, add the “Popular posts” block anywhere blocks work, including block theme templates. In the block’s settings, choose:
- how many posts to list, up to 20 (5 by default)
- the period: last 7, 30 or 90 days, or all time (30 days by default)
- which post types to include (posts by default)
- a plain list or a list with featured images
- whether to show each post’s view count
- whether to leave out the post being read (on by default)
Only published posts that aren’t password-protected are listed.
Shortcode
On classic themes or in a page builder, use:
[vireo_popular_posts number="5" period="30" post_types="post,page" display="thumbnails" show_views="true"]
| Attribute | Values | Default |
|---|---|---|
number |
1 to 20 | 5 |
period |
7, 30, 90 or all |
30 |
post_types |
public post types, separated by commas | post |
display |
list or thumbnails |
list |
show_views |
true or false |
false |
exclude_current |
true or false |
true |
Widget
Classic themes also get a “Popular posts (Vireo)” widget under Appearance, Widgets, with the same choices.
Popular products
With Vireo Pro and a store, the “Popular products” block and the [vireo_popular_products] shortcode list your best-selling, highest-earning or most viewed products in the same style. See Revenue tracking.
A single post’s views
Add the “Post views” block to a single post template, or use the shortcode:
[vireo_views]
[vireo_views post_id="123" period="all"]
With no post_id, it shows the views of the post being read. period takes the same values as above and defaults to all. Nothing is shown for drafts, private posts or password-protected posts.