Support » Fixing WordPress » Calling WP_Query does return a Post, but not the Tags

  • Hello,

    My index.php looks like this (irrelevant HTML skipped):

    $myPosts = new WP_Query('category_name=xxxxxx&showposts=3&order=DESC');
    $myPosts->the_post();
    print "<h1>" . get_the_title() . "</h1>";
    print get_the_tags('<p class="tags"><strong>Tags: </strong>', ' | ', '</p>');

    My problem is that the title is returned, but the tags are not.

    I have read the file query.php but cannot find a clue where to look for a solution. I hope this is not too much a newbie question.

    Thanks for your help.
    Regards,
    Bert

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Calling WP_Query does return a Post, but not the Tags’ is closed to new replies.