Help fix code for Recent Posts by Category?
This is a two part question.
The following code is doing what I want as far as returning recent post titles limited to one category.
1. I would like to be able to limit the number of entries it returns to 10 or so.
Secondly, it is showing them with only a space between them, i.e.,:
June bugs, potatoes, keyboard
I would like it to look like:
However, clearly, I am too daft to figure it out.
<li id="categories"><?php _e('News'); ?>
<?php $temp_query = $wp_query; ?>
<?php query_posts('cat=3'); ?>
<?php while (have_posts()) : the_post(); ?>
<id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a><br>
<?php endwhile; ?>
<?php $wp_query = $temp_query; ?>
- The topic ‘Help fix code for Recent Posts by Category?’ is closed to new replies.