WordPress.org

Ready to get started?Download WordPress

Forums

Getting all posts with an specific tag_name (2 posts)

  1. Maggical
    Member
    Posted 4 years ago #

    Hi there, I want to select all of the posts on my wordpress that have the "Destacado" tag assigned.

    I'm currently selecting them by category, but want to change that. How can I do this?

    I currently have this:

    $recent = new WP_Query( 'showposts=' . $number . '&category_name=' . $category );

    And tried this but won't work (it shows all of the posts):

    $recent = new WP_Query( 'showposts=' . $number . '&tag_name=Destacado' );

    This won't work either, same result as above:

    $recent = new WP_Query( 'showposts=' . $number . '&tag_name=destacado' );

    Any help?

    Thanks,

    Javier

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic