Support » Fixing WordPress » How to make feature post section disappear in next page

  • In my index.php I display a feature post by pulling from the feature category, then shows my latest posts underneath it. But as soon as you hit the “previous posts” link – the feature post stays on top. How do I make this disappear?

    Below is my code:

    <?php include('feature-post.php'); ?>
    <?php get_sidebar();?>
    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    	<div class="postBox">
    	<img src="<?php echo get_post_meta($post->ID, 'thumb', $single = true); ?>" class="thumbs"   />
    	<h4><a href="<?php the_permalink() ?>" title="<?php the_title() ?>"><?php the_title();?></a></h4>
    	<div class="postBox-entry-content">
    	<?php the_excerpt();?>
    <?php endwhile; endif; ?>
    	<div class="nav-previous"><?php next_posts_link('&laquo; Next page') ?></div>
    				<div class="nav-next"><?php previous_posts_link('Previous page &raquo;') ?></div>
Viewing 3 replies - 1 through 3 (of 3 total)
  • An example of what I’m talking about: In WP-premium’s homepage – you see a feature image above the rest of the thumbnails. But as soon as you hit next page, that feature image is not included with the rest of the thumbnail posts. Anyone please shed some light!

    i plugged in this code but still didn’t work:
    <?php if(is_home()){include(‘feature-post.php’);} ?>

    please help

    If you didn’t find a solution yet,
    I use this kind of code in index php

    <?php if ( $paged < 2 ) { // Do stuff specific to first page?>
     // Include tabs with the lead story
     include(TEMPLATEPATH . '/feature-post.php'); ?>
    <?php } // end specific to first ?>

    my feature post php is in the theme folder…

    please tell us if it works or how you did it now

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to make feature post section disappear in next page’ is closed to new replies.