Category List in Sidebar with Exerpt
-
Greetings,
This has to be an easy solution, but I have tried everywhere and can not knit together each aspect.
I would like to have posts excerpts from a single category load into my sidebar. I would love to be able to use the <–read more–> within the posts to dictate the output in the sidebar. When the read more is clicked the entire post should load into the single.php format.
Below is code that I am using in my index page for a different category on the home (index) page. It works great. I wish I could understand it so I could just copy and paste and adjust.. LOL
<?php if (have_posts()) : ?>
<?php
if (is_home()) {
query_posts(“cat=-21”);}?>
<?php while (have_posts()) : the_post(); ?>
<div class=”entry”>
<div class=”post” id=”post-<?php the_ID(); ?>”>
” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?>
<?php the_content(‘Read more…’); ?>
</div>
</div>
<?php endwhile; ?>
- The topic ‘Category List in Sidebar with Exerpt’ is closed to new replies.