Support » Plugin: WordPress Popular Posts » Categories orderby View Data Collected by This Plugin

  • Is it possible to use wpp_get_views to order posts displayed on a category template page?

    This is what I have so far:

    $category_id = (int)get_cat_ID(single_cat_title('', false));
    $popular_posts = wpp_get_views($post->ID, 'all');
    $args = array(
    	'cat' => $category_id,
    	'meta_key' => $popular_posts,
    	'orderby'=> 'meta_value',
    	'order' => 'DESC',
    	);

    Any thoughts? Many thanks 🙂

    https://wordpress.org/plugins/wordpress-popular-posts/

  • The topic ‘Categories orderby View Data Collected by This Plugin’ is closed to new replies.