WordPress.org

Support

Support » How-To and Troubleshooting » Getting all posts with an specific tag_name

Getting all posts with an specific tag_name

  • 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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Getting all posts with an specific tag_name’ is closed to new replies.