Using Categories on front page
-
I’m re-designing my book review site so more posts are shown on the front page. I’ve made three columns and would like each column to have the newest posts from certain categories.
https://tsms.tenerifeholidayapartments.biz/ < This is my work in progress. For the left column I want my “Book review” category to be shown, the middle column I want “Book news” category & on the right I want “Author Interviews” to be shown.
This is the current code I have but I’m not sure how to get the category PHP and where to put it:
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <img src="https://chicklitreviews.com/wp-content/themes/chicklitreviews2%20(2)/images/PostDateIcon.png"> Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><img src="https://www.famfamfam.com/lab/icons/mini/icons/icon_attachment.gif">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Using Categories on front page’ is closed to new replies.