Created
September 27, 2013 11:43
-
-
Save hchouhan/6727363 to your computer and use it in GitHub Desktop.
IRT - Updated code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$query_top_10_showcase = new WP_Query( | |
array( | |
'post_type' => array( 'showcase' ), | |
'orderby' => 'meta_value', | |
'meta_key' => '_recommended', | |
'paged' => $paged | |
) | |
); | |
// Run the loop as normal | |
if ( $query_top_10_showcase->have_posts() ) : | |
while ( $query_top_10_showcase->have_posts() ) : $query_top_10_showcase->the_post(); | |
$url = get_post_meta( $post->ID, '_dot_showcase_url', true ); | |
$recommended = get_post_meta( $post->ID, '_recommended', true ); | |
?> | |
<p> | |
<?php the_title() ?> - <?php echo $recommended; ?> | |
</p> | |
<?php | |
endwhile; | |
else: | |
// no posts found | |
endif; | |
wp_reset_postdata(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment