WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a list of links to post that are tagged a specific category. Is this possible? I'm not even sure where to begin. Any help?

so, for example I'm trying to show the 1st ten post that are tagged "video".


share|improve this question
up vote 1 down vote accepted

You can do this by putting this where you want to display the list :

global $post;
$args = array( 'numberposts' => 10, 'offset'=> 1, 'category' => 1 );
$myposts = get_posts( $args );
foreach( $myposts as $post ) :  setup_postdata($post); ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>

In here all you need to do is replace the category ID with your desired categ ID. `'category' => 1 and that's all

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.