List specific tag in a page
-
I am using is_tag() as a boolean to loop the posts with some specific tag, but with no results.
See the code:
<?php if( is_tag('destaque')): ?> <?php $posts = get_posts('numberposts=4'); foreach($posts as $post) { ?> <h2><?php the_title(); ?></h2> <?php } ?> <?php endif ?>
Does somebody knows how to do that? Am I doing something wrong?
Thank you all.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘List specific tag in a page’ is closed to new replies.