Return to Snippet

Revision: 57469
at May 28, 2012 08:36 by thewickedchemist

Initial Code
$cat_posts = get_posts('category=10&numberposts=-1'); 
foreach($cat_posts as $post) : setup_postdata($post);
  <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink to <?php the_title(); ?>">
    <?php the_title(); ?>
  <?php endforeach; ?>

Initial URL

Initial Description
Takes titles from a certain category and lists them in an unordered list.

Initial Title
WORDPRESS - Get only titles from specific category

Initial Tags
php, wordpress

Initial Language