Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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".

thanks,

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

<ul>
<?php
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; ?>
</ul>

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
add comment

Your Answer

 
discard

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.