Hi, this is the code I tried to use (in my nav bar) but it displayed only one post, the last. I ask the code to display the last 15 url I'm using WP 2.3 Thanks for your help <h2>Shop By Brand</h2> <?php $my_query = new WP_Query('category_name=Shop By Brand&showposts=15'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <?php endwhile; ?> Sorry! I find the answer. I just forgot to put <br> after each url
Try this.. <ul> <?php global $post; $myposts = get_posts(’numberposts=XXcategory=XX’); foreach($myposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </li> <?php endforeach; ?> <ul>