Hi i am using the query below to display post from a certain tag term, but what I want it to show multiple post.

So far the query is displaying only 1

$args = array('tag_slug__and' => array('morning-meat'), 'showposts' => array ('3'),);
$postslist = get_posts( $args );
foreach ($postslist as $post) :  setup_postdata($post); ?>
    <li><?php the_title(); ?></li>
<?php endforeach; ?>

I can't figure out the problem.

  • Your issue is that it is only returning 1 post instead of 3? Are you sure there are 3 posts with that tag?
    – Chris
    Oct 23, 2015 at 2:44

1 Answer 1


I believe showposts as been depreciated in favor of posts_per_page

$args = array(
    'posts_per_page' => 3,
    'tag_slug__and' => array('morning-meat')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.