• 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.

    Follow my code:

    <?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(); ?>

  • The topic ‘problem in the loop with wp-Postviews’ is closed to new replies.