I want to display specific posts from an array with specific tags i.e. “Bolivia” and “Brazil” and then show the post thumbnail and permalink.
This is the code I am using so far but as you can see I am not calling the tags.
Thanks.
<?php query_posts(array('category__in' => array(4), 'posts_per_page' => 4)); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $currentid = get_the_id(); ?>
<div class="list-box">
<a href="<?php the_permalink(); ?>"><?php echo get_the_post_thumbnail($currentid, array(120, 100)); ?></a>
<div class="list-box-title"><h3><?php the_title(); ?></h3></div>
</div>
<?php
endwhile;
endif;
wp_reset_query();
?>
See the WP docs for query_posts.
Relevant excerpt:
Or using the array version you’re using, something like this:
String version for your case: