[Plugin: Post Views Count] Help migrating from WP-Postviews to your plugin
-
It seems your plugin can support date ranges, something other plugins cannot. So i would like to query most viewed post from today or a week.
Currently i call my posts via 2 ways.One is
<? query_posts('category_name=asdf&showposts=8&meta_key=views&orderby=meta_value_num&order=DESC&monthnum=' . date( 'n', current_time('timestamp'))); ?>
But i’m not sure how to make this “daily” instead of monthly.
Second way i can use is:
<?php $cat_id='-8';//the category ID $limit = get_option('posts_per_page'); query_posts(array('category__and'=>array(276), 'showposts'=>8,'more' => $more = 0, 'meta_key' => 'views', 'orderby' => 'meta_value_num', 'order' => 'DESC', )); ?>
I know i simply have to replace
'meta_key' => 'views'
, with'meta_key' => '_count-views_all'
But, what i dont know and really need is to include a date range. The above code outputs total views from all time. Tomorrow, i would like to have a new list of posts instead of the total view’s posts showing again.
https://www.ads-software.com/extend/plugins/baw-post-views-count/
- The topic ‘[Plugin: Post Views Count] Help migrating from WP-Postviews to your plugin’ is closed to new replies.