• Resolved luhciano

    (@luhciano)


    I’m trying to loop using the wp-PostViews plugin, my intention is that it lists the first that has larger view.

    The problem that is happening is that it is not listing all the posts, just those that have display 1.

    I need you to list all posts more than organize by views number, highest to lowest.

    <?php
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query( array ( ‘post_type’ => ‘movies’,’paged’ => $paged, ‘meta_key’=>’views’,’orderby’ => ‘meta_value_num’,’order’ => ‘DESC’) );
    ?>
    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

    Is listing right from the largest to the smallest, it is not listing the posts that does not display, it would need to list all so posts, would change the code of the plugin somewhere he do it?

    https://www.ads-software.com/plugins/wp-postviews/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Hmm that is a technical limitation because you installed the plugin with existing post and hence those existing post doesn’t have a view count and hence will not appear in the loop.

    Thread Starter luhciano

    (@luhciano)

    most have no chance to change that?

    Plugin Author Lester Chan

    (@gamerz)

    Yes or alternative, you can visit those post so that a view post meta can be created.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘problem in the loop with wp-Postviews’ is closed to new replies.