List post titles as links in sidebar
-
Hey everyone. Hopefully you can help.
Basically I’ve just set up a new wordpress install and have most of it working but I have one issue.
My header menu allows uses to select posts by category name and this works perfectly. One of the categories is called “Free Reads” and the text on this page is quite long, so I’ve created a second sidebar that is only called when viewing posts in the category “Free Reads”. This again works perfectly, except one little thing. In the sidebar for this page I want it to list the posts in this category as links so users can simply click one of the free read links and they will be taken to the post.
I’ve used the following code, but it only creates a list of the posts, it doesn’t make them links to the actual posts. Any ideas on how to get them to be linked to posts?
<?php query_posts('category_name=free-reads&showposts=10'); ?> <?php while (have_posts()) : the_post(); ?> <?php the_title(); ?> <?php endwhile; ?>
Thanks, and any help is gratefully received. Bozo.
- The topic ‘List post titles as links in sidebar’ is closed to new replies.