How to display 2 blocks of popular posts in the same page
-
I need to display 2 blocks of popular posts in the same page but only the first one in the code is being displayed. One has to show the most viewed posts of the week and another one has to show the most viewed posts of the day. They use different templates.
My code is:
... <div> <?php if (function_exists('wpp_get_mostpopular')) { $most_viewed_week = 'limit=8&range="weekly"&order_by="views"&post_type="news"'; add_filter('wpp_custom_html', 'html_most_viewed_week', 10, 2); wpp_get_mostpopular($most_viewed_week); } ?> </div> ... <div> <?php if (function_exists('wpp_get_mostpopular')) { $most_viewed_day = 'limit=6&range="daily"&order_by="views"&post_type="news"'; add_filter('wpp_custom_html', 'html_most_viewed_day', 10, 2); wpp_get_mostpopular($most_viewed_day); } ?> </div> ...
Is there any way to display both blocks in the same page? How can I do it? Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to display 2 blocks of popular posts in the same page’ is closed to new replies.