Support » Fixing WordPress » Get tags form WP_Query();

  • Hi, I’m trying to modify posts based on the tags, but I can’t figure out how to get the tags. This is what i have so far:

    	$main = new WP_Query();
    	while($main->have_posts()) : $main->the_post();
    <!-- Do stuff -->
    <?php endwhile; ?>

    I want to be able to make an if statment like this:
    <?php if($tag == new){ echo"<img alt=\"\" src=\"http://example/wp-content/themes/mytheme/images/new.png\" class=\"newest\">";} ?>


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Get tags form WP_Query();’ is closed to new replies.