Created
August 30, 2012 21:24
-
-
Save technosailor/3541464 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
function tgm_beauty_review_layout() { | |
global $amm_core; | |
global $wp_query; | |
$paged = ( get_query_var('page') ) ? get_query_var( 'page' ) : 1; | |
$wp_query = new WP_Query( | |
array( | |
'paged' => $paged, | |
'post_status' => 'publish', | |
'posts_per_page' => 5, | |
'post_type' => 'reviews', | |
'meta_query' => array( | |
array( | |
'key' => 'review_type', | |
'value' => 'treatment' | |
) | |
), | |
) | |
); | |
if( have_posts() ) | |
{ | |
while( have_posts() ) : the_post(); | |
// Do stuff | |
endwhile; | |
wp_pagenavi(); | |
echo '</div>'; | |
} | |
else | |
{ | |
echo '<p>There are no reviews.</p>'; | |
} | |
wp_reset_query(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment