I'm doing a Wordpress loop to find those posts whose value of the custom field 'country' is equal to $ _GET ['s']
$args = array(
'post_type'=>'post',
'meta_query' => array(
array(
'key'=> 's',
'metavalue' => 'pais',
'compare' => '='
)
)
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
?><h2><?php the_title();?></h2><?php
}
}