BACK TO DIRECTORY

Popular Post Real Time

by vicenteguerra

1.0
(1 ratings)

Get popular posts from Google Analytics Real Time and set every 10 minutes a new category called “Popular RT” with a number (By default 10 Posts) of popular post that you want and the number of active users in every post in this category, ready for you display your blog´s trendy post in every place of your WordPress.

Query Example using the category and the number of views for sorting.

<?php  $args = array( 'posts_per_page' => 5,      'offset' => 0,      'category_name' => 'popular_real_time_cat',      'meta_key' => 'active_users',      'orderby' => 'meta_value_num',      'order' => 'DESC');       $queryWP = new WP_Query();   ?> 
  • The number of posts assigned in “Popular RT” may be less than the number selected (By default 10) because Google Analytics also include root path / (Home), categories or tags if have more active users than another posts.

Screenshots

Plugin Details

Active Installs
10
Total Downloads
1,683
Version
1.0
Requires WP
3.4
Requires PHP
—
Tested Up To
3.4.2
Added
2016-09-27
Last Updated
2016-09-27 4:17pm GMT

Ratings

5
0
4
0
3
0
2
0
1
1