Skip to content

Instantly share code, notes, and snippets.

@machida
Created June 16, 2012 07:21
Show Gist options
  • Select an option

  • Save machida/2940369 to your computer and use it in GitHub Desktop.

Select an option

Save machida/2940369 to your computer and use it in GitHub Desktop.
Call the articles with a specific tag use query_posts
<ul>
<?php if (have_posts()) : query_posts('&tag=wordpress&showposts=10'); ?>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endwhile; endif; ?>
<?php wp_reset_query();?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment