Pages navigation not working
-
Hello
In my website s’ theme, i set the posts number in the home page 8 posts, but when i click on older posts or newer posts, it doesn’t show the next or the last page of posts, but it shows the same posts all the time ..
see http://redz85.com …
I checked the navi.php and there is nothing wrong at all.
How can i fix that plz ????
Help me plzzzzzzzz
-
Does your theme’s index.php template file use a custom query?
http://codex.wordpress.org/Function_Reference/query_postshmmmm i dont know really :/
but i think this code is doing the same as ur link says :
<?php global $post; $myposts = get_posts('numberposts=8&offset=1'); foreach($myposts as $post) : setup_postdata($post); ?>That’s a secondary Loop. What’s the main Loop in index.php?
here is the whole index.php
[Code moderated as per the Forum Rules. Please use the pastebin]
Try
<?php if( function_exists('wp_pagenavi')) : wp_pagenavi(); else: ?> <div class="navigation"> <p class="more"><?php next_posts_link(__('« Older Entries', 'wpzoom')); ?><?php previous_posts_link(__('Newer Entries »', 'wpzoom')); ?></p> </div><!-- end .navigation --> <?php endif;?>jerocarson
Thank you, but should i put this in the navi.php ? or where ???
You need to find where this code is. .
<div class="navigation"> <p class="more"><?php next_posts_link(__('« Older Entries', 'wpzoom')); ?><?php previous_posts_link(__('Newer Entries »', 'wpzoom')); ?></p> </div><!-- end .navigation --> <?php endif;?>Most time, it is usually located in navi.php. if it’s not there, just go through all the pages, till see this navigation snippet.
when you find it, do not delete anything. .. just add this
<?php if( function_exists('wp_pagenavi')) : wp_pagenavi(); else: ?>above the default Navigation code.
Hope it works…
sadly, it didnt work 🙁
The topic ‘Pages navigation not working’ is closed to new replies.