/ Published in: PHP

Takes titles from a certain category and lists them in an unordered list.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<ul> <?php $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(); ?> </a></li> <?php endforeach; ?> </ul>
Comments
