Making an "all posts" category???
-
I’m currently using the “Church theme” by studiopress, and on my website, theres options to show latest posts from three categories on the home page (left block, right block, and bottom block). On the bottom block, I want to show all recent posts, not just from a specific category.
Either I:
1. Somehow make a category that contains all posts.
or
2. Edit the home template.Here’s my code for that block in home.php:
<div id="homepagebottom"> <div class="hpbottom"> <h3><?php echo cat_id_to_name(get_theme_mod('featured_bottom')); ?></h3> <?php $recent = new WP_Query("cat=".get_theme_mod('featured_bottom')."&showposts=".get_theme_mod('featured_bottom_num')); while($recent->have_posts()) : $recent->the_post();?> <?php if( get_post_meta($post->ID, "thumb", true) ): ?> <a href="<?php the_permalink() ?>" rel="bookmark"><img class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=<?php echo get_theme_mod('featured_bottom_thumb_height'); ?>&w=<?php echo get_theme_mod('featured_bottom_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" /></a> <?php else: ?> <?php endif; ?> <strong><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></strong> <?php the_content_limit(350, __("[Read more of this review]", 'studiopress')); ?> <hr/> <?php endwhile; ?> <?php $cat = get_category(get_theme_mod('featured_bottom')); ?> <strong><a href="<?php echo get_category_link(get_theme_mod('featured_bottom')); ?>" rel="bookmark"><?php echo __("Read More Posts From ", 'studiopress')." ".$cat->name; ?></a></strong> </div> </div> </div>
Help is greatly appreciated! Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Making an "all posts" category???’ is closed to new replies.