How do I show most viewed posts on a per-month basis?

For last month this query worked, now this 3 days (new month started), no posts at all:

<?php $current_year = date('Y'); ?>
<?php $current_month = date('m'); ?>

<?php endif;

arras_featured_loop( arras_get_option('featured1_display'),
apply_filters('arras_featured1_query', array(
    'list'              => $featured1_cat,
    'taxonomy'          => arras_get_option('featured1_tax'),
    'query'             => array( 'posts_per_page' => 15,
    'meta_key' => 'post_views_count',
    'orderby' => 'meta_value_num',
    'order' => 'DESC', 
    'year' => $current_year,
    'monthnum' => $current_month,
    'category_name' => Music,
    'posts_per_page'    => $featured1_count,
    'exclude'           => $post_blacklist,
    'post_type'         => arras_get_option('featured1_posttype')
    )
) ) );
?>

Any kind of help will be appreciated.

Read More

UPDATE:

This was not pissible.
But now I found way to do this with plugin Wordpres Popular Posts.

Its working alone in template with this code:

<?php
if (function_exists( 'wpp_get_mostpopular' )) {
  wpp_get_mostpopular('range=weekly&cat=276&order_by=views&limit=8');
}
?>

Now, what I need to do is to use this code up into this template down:

<?php endif;

arras_featured_loop( arras_get_option('featured1_display'), apply_filters('arras_featured1_query', array(
    'list'              => $featured1_cat,
    'taxonomy'          => arras_get_option('featured1_tax'),
    'query'             => array(
        'posts_per_page'    => $featured1_count,
        'exclude'           => $post_blacklist,
        'post_type'         => arras_get_option('featured1_posttype')
    )
) ) );
?>

I think I need to put it inside here:

'query'             => array( 

Problem is I don’t know to turn query from existing to one with arrows ‘range=weekly’ to ‘range’ => weekly didnt worked.

Related posts

Leave a Reply