WordPress.org

Ready to get started?Download WordPress

Forums

Same posts appear on each page - using original premium news theme (4 posts)

  1. acecarter
    Member
    Posted 5 years ago #

    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 http://www.example.com/page/2 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'); ?>
    
    			<?php
    				$showvideo = get_option('woo_show_video');
    				if($showvideo){ include(TEMPLATEPATH . '/includes/video.php'); }
    			?>
    
    			<?php
    				$layout = get_option('woo_layout');
    				if ($layout == "false")
    					include('layouts/default.php');
    				else
    					include('layouts/blog.php');
    			?>
    
    		</div><!--/col1-->
    
    <?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">
    
    <?php
    
    	$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" />			
    
    			<?php } else { ?> <!-- DISPLAY THE DEFAULT IMAGE, IF CUSTOM FIELD HAS NOT BEEN COMPLETED -->
    
    				<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>
    
    		</div><!--/post-->
    
    		<?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 />
    </div>
    
    <p class="ar hl3"><a href="http://www.acecarter.com/archive"><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>
    		</div>		
    
    </div><!--/box-->

    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 : http://www.hollywire.com
    they added the wp pagenavi plugin and it works fine.

    Thanks alot for your help in this.

    other forum posts i found on this:
    http://wordpress.org/support/topic/255333
    http://wordpress.org/support/topic/240572
    http://wordpress.org/support/topic/255475

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

    Ace

  2. acecarter
    Member
    Posted 5 years ago #

    Anyone? I have been tearing my hair out over this....

  3. acecarter
    Member
    Posted 5 years ago #

    BUMP

  4. acecarter
    Member
    Posted 5 years ago #

    anyone??

Topic Closed

This topic has been closed to new replies.

About this Topic