Support » Fixing WordPress » Sticky Post Between Featured Gallery and Post Excerpts

  • Hi everyone. I’m a newbie to WordPress. Please help me if you can.

    I’ve a sticky post on my blog. But the theme I’m using is coded to show the post excerpts immediately after the featured gallery and hence it is not showing my sticky post. Now what I want is (on the home page) to show my sticky post immediately after the featured gallery and before the post excerpts. I want this to be shown exactly as it shows as a single post but in between the featured gallery and post excerpts.

    I’m pasting the whole index.php file here –

    <?php get_header(); ?>
    				<div id="content_area"><!--content_area-->
                    	<div class="banner">
    						<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
    I want the sticky post here exactly as it shows as a single post
                        	<div class="review_title"><h2>Reviews</h2></div>
    								$limit = get_option('posts_per_page');
    								$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    								'meta_key' => 'dbt_show',
    								'meta_value' => 1,
    								'showposts'=> $limit,
    								'paged' => $paged,
    								global $more;
    								$more = 0;
                             <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                            <div class="post"><!--post-->
                                <div class="img_box">
                                	<?php $thumb_img = get_post_meta($post->ID, 'dbt_thumb', true);?>
                                    <?php if($thumb_img) : ?><img src="<?php bloginfo( 'template_url' ); ?>/tools/timthumb.php?src=<?php echo $thumb_img; ?>&w=148&h=148&zc=1" alt="" /><?php else : $thumb_img =  get_bloginfo('template_url').'/images/img_01.jpg';  ?><img src="<?php bloginfo( 'template_url' ); ?>/tools/timthumb.php?src=<?php echo $thumb_img; ?>&w=148&h=148&zc=1" alt="" /><?php endif ?>
                                <div class="review_box_title">
                                    <h2><a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                                    <div class="star_box">
                                    	<?php $rating = get_post_meta($post->ID, 'dbt_stars', true);
    										for($i=0; $i<$rating; $i++)
    										{ ?>
    											<img src="<?php bloginfo('template_url');?>/images/star_img.jpg" alt="" />
    										<?php }
                                <div class="review_entry" style=" border:1px solid red;"><!--review_entry-->
                                    <?php the_excerpt(''); ?>
                                    <div class="button_box_area"><!--button_box_area-->
                                        <div class="button_box_lft">
                                            <a href="<?php the_permalink(); ?>" title=""><span><span>READ REVIEW</span></span></a>
                                        <div class="button_box_rgt">
                                            <a href="<?php echo get_post_meta($post->ID, 'dbt_website', true); ?>" title=""><span><span>VIEW</span></span></a>
                            <?php endwhile; ?>
    							<div class="navigation">
    								<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
    						<?php endif; wp_reset_query(); ?>
                    <?php include(TEMPLATEPATH.'/sidebar.php') ?>
    <?php get_footer(); ?>

    Thanks in advance

  • The topic ‘Sticky Post Between Featured Gallery and Post Excerpts’ is closed to new replies.