Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'posts_per_page' => 6,
- 'post_type' => 'post',
- 'post_status' => 'publish',
- 'orderby' => 'post_views',
- 'order' => 'DSC'
- );
- $query = new WP_Query( $args );
- if ( $query->have_posts() ) : ?>
- <?php while ( $query->have_posts() ) : $query->the_post(); ?>
- <h1><a href="<?php the_permalink(); ?>"><?php echo get_the_title(); ?></a></h1>
- <?php endwhile; endif; ?>
Add Comment
Please, Sign In to add comment