![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi, I'd like to have my best posts appear in the hpbottom. I think I will need to create a category for them ex:"recent posts" aside from that I don't know how to accomplish getting them to appear in the hpbottom. Can someone explain how to do this?
thank you My home.php code is below. <?php get_header(); ?> <div id="content"> <div id="homepage"> <?php /*Check for the 'gallery_styles' function. if it's there, then include it. If not, do nothing*/ ?> <?php if (function_exists('gallery_styles')) : ?> <div id="homepagetop"> <div class="featuredtop"> <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?> </div> </div> <?php endif; ?> <div id="homepagebottom"> <div class="hpbottom"> <?php $feature_cat_3 = get_option('lifestyle_feature_cat_3'); $feature_cat_3_num = get_option('lifestyle_feature_cat_3_num'); if(!$feature_cat_3) $feature_cat_3 = 1; //setting a default ?> <h3><?php echo cat_id_to_name($feature_cat_3); ?></h3> <!--This is where the thumbnails are found for the homepage bottom section - note the custom field name for this image is "hpbottom". Recommended image size is 70x70, as the stylesheet is written for this size.--> <?php $recent = new WP_Query("cat=".$feature_cat_3."&showposts=".$feat ure_cat_3_num); while($recent->have_posts()) : $recent->the_post();?> <?php if( get_post_meta($post->ID, "hpbottom", true) ): ?> <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "hpbottom", true); ?>" alt="<?php the_title(); ?>" /></a> <?php else: ?> <?php endif; ?> <b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b> <?php the_content_limit(350, "[Read more of this review]"); ?> <div style="border-bottom:1px dotted #94B1DF; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div> <?php endwhile; ?> <b><a href="<?php echo get_category_link($feature_cat_3); ?>" rel="bookmark">Read More Posts From This Category</a></b> </div> </div> </div> <?php include(TEMPLATEPATH."/sidebar.php");?> </div> <!-- The main column ends --> <?php get_footer(); ?> |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| About Me at bottom of posts | grealtor | General Discussion | 1 | 02-17-2010 05:28 AM |
| Add Posts in Widget Bottom Right et Bottom Left | patoune | General Discussion | 9 | 06-01-2009 08:55 PM |
| Posts next to the Bottom Featured box | Lance | General Discussion | 3 | 10-31-2008 10:10 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us