Skip to content

Instantly share code, notes, and snippets.

@iMojtaba
Created August 13, 2016 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iMojtaba/99301dd3ec5b43d7bad348382bbb8dbd to your computer and use it in GitHub Desktop.
Save iMojtaba/99301dd3ec5b43d7bad348382bbb8dbd to your computer and use it in GitHub Desktop.
<?php /* template name: Testssss */ ?>
<?php
$args = array(
'orderby' => 'meta_value_num',
'meta_key' => 'views',
);
$my_query = new WP_Query($args);
while ($my_query->have_posts()):
$my_query->the_post();
$do_not_duplicate = $post->ID;
?>
<li><?php the_title(); ?></li>
<?php endwhile; wp_reset_postdata(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment