WP-PageNavi Version 2.72 Not Showing Page 2
it is not the plugins fault – there is something missing in index.php (?) of your theme.
your index.php may have two loops with custom queries.
edit index.php and look for the second custom query to show the list of posts;
check if it includes the ‘paged’ parameter.
(if there is an ‘offset’ parameter, things are more complicated; and you may be better off to try to get help from the theme’s author.)
if not, check this:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('cat=-24&paged=' . $paged);
on how you may be able to add this parameter (the
cat=24will definitely look different in your code, but the principle should be the same)
you could also paste the code of index.php into a http://wordpress.pastebin.com/ and post the link to it here.
i think this is the line with your query:
try and change it from this:
<?php $recent = new WP_Query("showposts=10"); while($recent->have_posts()) : $recent->the_post();?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $recent = new WP_Query("showposts=10&paged=" . $paged); while($recent->have_posts()) : $recent->the_post();?>
good luck 😉
Greetings of Peace!
I’ve got Pagi Navi installed, it appears fine, and when I click the next page the URL changes, but the content doesn’t. Any idea why? I’d like to know how to resolve this one. Any valuable information means a lot to me. Cheers!
I have posted my index.php, here’s the link: http://wordpress.pastebin.com/7WMhAV5h
I have Pagi Navi installed as well and I’m having a similar issue as Kennyk3. I was hoping that alchymyth might be able to help me too.
I have posted my index.php here
Hope you can help!
your code already has the ‘paged’ paramter; so the reason must be somwehere else in your theme files.
did you contact ‘woo’ about the problem?
(imho, prev/next posts links should be coded and working in every published theme)
a link might help to check the behaviour of your site.
are your permainks working? what if you reset to default permalinks?
your code has a ‘normal’ loop without custom query; so the above fix would not work.
it could be that some widget or other code in the left sidebar is disturbing the query-string;
try to add
<?php wp_reset_query(); ?>before line 7
<?php if (have_posts()) : ?>
check your permalinks settings as well.
Thanks for the help Alchy,
I just realized I didn’t include exactly what was happening. When I use my sites (www.bringonmixedreviews.com) search and look for let’s say “guitar” and it comes back with results, Page Navi is fine for that first page of results, but when I attempt to click page 2 of the search results, it reverts to page 2 of the linear regular postings. really weird. I’m not sure what would help fix it. any ideas?
Thanks in advance!
I tried this… however on the line:
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
The $page var returns 0, whenever it’s on page 2 or above, hence the page module doe snot work – even the previous_posts_link() function fails to load because it WP thinks it’s on the default page, even when the URL is /page/2 or /page/3…. Any ideas?
i configure my blog at http://guj.krutarth.com
which is redirected at http://www.krutarth.com/Gujarati/
Where i have find page navi. error as mantion below.
when ever i open http://www.krutarth.com/Gujarati/ this link that time page navi is not working proper.
becz when i click at page 2 that time by default they open http://www.krutarth.com/Gujarati/index.php/Index.php/page/2
when i use default permenent link that time it’s work normal but when i use http://domain.com/Blog/inde.php/%postname%
that time it’s not working proper.
and i dont ready to use default per. link for my blog.
plz find my index.php code at http://wordpress.pastebin.com/P0fBjYsr
also find wp-pagenavi.php code at http://wordpress.pastebin.com/rdJV50Uc
plz help me out from this problems…. as soon as possible.
Thanks & Regards
i have a problem to, on archive.. and there are no query_post on it.
<?php get_header(); ?> <h1><?php single_cat_title(NULL); ?></h1> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div> <h3><a href="<?php the_permalink() ?>" title="<?php single_cat_title(NULL); echo " - "; the_title(); ?>"><?php the_title(); ?></a></h3> <?php the_excerpt() ?> </div> <?php endwhile; endif; ?> <?php wp_pagenavi(); ?> <?php get_footer(); ?>
on page http://www.lucianonarede.com.br/teste/noticias/page/2/
The plugin was working fine on my blog for months.
Since i did the last update, i can not go to any page after page 1: I get an error: “Page is missing”.
Thanks in advance for any help 🙂
I have the same problem and since I can’t contact the theme author, I really hope someone on this forum can help me
I have paste the code of index.php into http://wordpress.pastebin.com/3R3ix6wr
please see it if you have some free time. Thanks in advance 🙂
alchymyth thanks a lot ur solution worked perfect!
I faced the same problem, too. How to fix it? here is the index.php
?php if (is_archive()) $post_number = get_option(‘thesource_archivenum_posts’);
if (is_search()) $post_number = get_option(‘thesource_searchnum_posts’);
if (is_tag()) $post_number = get_option(‘thesource_tagnum_posts’);
if (is_category()) $post_number = get_option(‘thesource_catnum_posts’);
if (is_home()) $args=array(
‘category__not_in’ => get_option(‘thesource_exlcats_recent’),
<?php get_header(); ?>
<?php global $query_string;
if (is_category()) query_posts($query_string . “&showposts=$post_number&paged=$paged&cat=$cat”);
elseif (is_home()) query_posts($args);
else query_posts($query_string . “&showposts=$post_number&paged=$paged”); ?
- The topic ‘WP-PageNavi Version 2.72 Not Showing Page 2’ is closed to new replies.