<div id="content"><div class="popup-loader"></div>
<div id="content_masonry">
<?php
$args = array(
'meta_query' => array(
'meta_value_num' => array(
'key' => 'popularity'
),
),
'orderby' => 'meta_value_num',
'post_status' => 'publish',
'order' => 'DESC'
);
$wp_query = new WP_Query( $args );
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<?php get_template_part('loop'); ?>
<?php endwhile; ?>
</div>
</div>
<div id="page-nav"><?php next_posts_link($loop->max_num_pages); ?></div>