Support » Fixing WordPress » Same posts appear on each page – using original premium news theme

  • Ive been having trouble with this for the past couple of days. Basically, the page navigation on the original premium news theme (made by woo themes) is non existent really.

    I click to go on page 2 (using the wp pagenavi plugin) and the url changes to but the posts are the same as page 1.

    Ive seen the older posts on this forum but cant make heads or tails as to what I’m supposed to do.

    my index.php is as follows:

    <?php get_header(); ?>
    		<div class="col1">
    			<?php include(TEMPLATEPATH . '/includes/featured.php'); ?>
    				$showvideo = get_option('woo_show_video');
    				if($showvideo){ include(TEMPLATEPATH . '/includes/video.php'); }
    				$layout = get_option('woo_layout');
    				if ($layout == "false")
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    And i have a default.php file which i think is where i need to make some changes

    <div class="box">
    	$the_query = new WP_Query('cat=-'. $GLOBALS[ex_feat] . ',-' . $GLOBALS[ex_vid] . '&showposts=' . get_option('woo_other_entries') . '&orderby=post_date&order=desc');
    		$counter = 0; $counter2 = 0;
    		while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
    		<?php $counter++; $counter2++; ?>
    		<div class="post <?php if ($counter == 1) { echo 'fl'; } else { echo 'fr'; $counter = 0; } ?>">
    			<?php if ( get_post_meta($post->ID, 'image', true) ) { ?> <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD -->
    				<img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&h=57&w=100&zc=1&q=90" alt="" class="th" />			
    				<img src="<?php bloginfo('template_directory'); ?>/images/no-img-thumb.jpg" alt="" class="th" />
    			<?php } ?> 
    			<h2><?php the_category(', ') ?></h2>
    			<h3><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    			<p class="posted">Posted on <?php the_time('d F Y'); ?></p>
    			<p><?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?> <span class="continue"><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>">Continue Reading</a></span></p>
    			<p class="comments"><?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?></p>
    		<?php if ( !($counter2 == get_option('woo_other_entries')) && ($counter == 0) ) { echo '<div class="hl-full"></div>'; ?> <div style="clear:both;"></div> <?php } ?>
    	<?php endwhile; ?>
    	<div class="fix" style="height:20px"></div>
    <?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?>
    <div align="center">
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
    <br />
    <p class="ar hl3"><a href=""><font color="black"><font size="4"><b>SEE MORE POSTS IN THE ARCHIVE</b></font></font></a></p>
    <div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>

    As you can see, normally there is just a “see more posts in the archive” link. I had to add in myself the next/previous entries code and wp pagenavi code.

    what i want to achieve is what hollywire has :
    they added the wp pagenavi plugin and it works fine.

    Thanks alot for your help in this.

    other forum posts i found on this:

    Im a total newbie to the coding so I may need step by step instructions on what to do.
    Thanks again.


Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Same posts appear on each page – using original premium news theme’ is closed to new replies.