I'm trying to output the last (chronologically) 4 posts having the tag (slug) "pp".
<ul>
<?php
$args = array( 'posts_per_page' => 4, 'taxonomy' => 'tag', 'field' => 'slug', 'terms' => 'pp' );
$tag_posts = get_posts( $args );
foreach ( $tag_posts as $post ) :
setup_postdata( $post ); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach;
wp_reset_postdata(); ?>
</ul>
This snippet though output 4 entries of the same post, which is the fourth from last! How come? :)
var_dump( $tag_posts );
so you can see if they really are the same post.