Created
May 28, 2014 17:38
-
-
Save leocaseiro/98278722e20af4f37d9b to your computer and use it in GitHub Desktop.
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 | |
$params = array('post_type' => 'garimpeiros', 'paged' => $paged); | |
if (isset($wp_query->query_vars['estado']) && '' != $wp_query->query_vars['estado'] ) : | |
$params['meta_query'] = array( | |
array( | |
'key' => 'estado', | |
'compare' => '=', | |
'value' => $wp_query->query_vars['estado'], | |
) | |
); | |
endif; | |
$garimpeiras = new WP_Query($params); | |
?> | |
<ul> | |
<?php if ( $garimpeiras->have_posts() ) : while ( $garimpeiras->have_posts() ) : $garimpeiras->the_post(); ?> | |
<li><?php the_title(); ?></li> | |
<?php endwhile; else: ?> | |
<li><?php _e('Sorry, no posts matched your criteria.'); ?></li> | |
<?php endif; ?> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment