Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

WP - Page navigation not working... WordPress

  • REFUNDED

The page navigation is not working on my homepage. When I click on any subsequent page number it displays only the posts on page 1.

I am using the pagenavi plugin from Lesterchan but it is also not working with the standard "previous page | next page" from the Arras theme.

URL: http://www.whatyouhavingforyourtea.com

Does anyone have any suggestions?

Answers (4)

2010-05-09

Oleg Butuzov answers:

line 82 (home.php)
'paged' => $paged,

replace by
'paged' => $wp_query->query_args['paged'],


Lee Jackson comments:

what are args?


Oleg Butuzov comments:

Thay shoudl be null

<?php arras_render_posts(null, arras_get_option('archive_display'), 'archive') ?>

do you still geting same posts on different page numbers?


Lee Jackson comments:

Yes. Any page gives page 1 content.

I just remembered, that I customized the code a while back to not duplicate the post content on the homepage.

so the top panel displays post 1
the secondary panels display posts 2-7
the third section displays posts 8-onwards...

could this have messed things up? I notice on the subsequent pages it displays post 1 then from post 8 onwards...

I don't remember how I did this. I'm a bit of a novice!

This make sense?


Oleg Butuzov comments:

Damn, your site make me filling hungry...

Logout please and take a look to the site like i see it. perhaps this is issue.


Lee Jackson comments:

Thanks i feel hungry looking at it too!

Logged out:

when I click any subsequent page ie. 4, 10, 15 etc I see the first post then post 8 onwards...

If I select a category ie Turkish, Spanish etc it works fine.




Oleg Butuzov comments:

Ok! continue! backup your home.php

find this code in home.php
<!-- Featured Articles -->
<?php if ( ($featured2_cat = arras_get_option('featured_cat') ) !== '' && $featured2_cat != '-1' ) : ?>
<div id="index-featured">
<div class="home-title"><?php echo arras_get_option('featured_title') ?></div>
<?php
if ($featured2_cat == '-5') {
if (count($stickies) > 0)
$query2 = array('post__in' => $stickies, 'showposts' => arras_get_option('featured_count') );
} elseif ($featured2_cat == '0') {
$query2 = 'showposts=' . arras_get_option('featured_count');
} else {
$query2 = 'showposts=' . arras_get_option('featured_count') . '&cat=' . $featured2_cat;
}

arras_render_posts($query2, arras_get_option('featured_display'), 'featured');
?>
</div><!-- #index-featured -->
<?php endif; ?>

replace by this
<code><?php if ($wp_query->query_vars['paged'] == 0) {?>
<!-- Featured Articles -->
<?php if ( ($featured2_cat = arras_get_option('featured_cat') ) !== '' && $featured2_cat != '-1' ) : ?>
<div id="index-featured">
<div class="home-title"><?php echo arras_get_option('featured_title') ?></div>
<?php
if ($featured2_cat == '-5') {
if (count($stickies) > 0)
$query2 = array('post__in' => $stickies, 'showposts' => arras_get_option('featured_count') );
} elseif ($featured2_cat == '0') {
$query2 = 'showposts=' . arras_get_option('featured_count');
} else {
$query2 = 'showposts=' . arras_get_option('featured_count') . '&cat=' . $featured2_cat;
}

arras_render_posts($query2, arras_get_option('featured_display'), 'featured');
?>
</div><!-- #index-featured -->
<?php endif; ?>
<?php } ?>



cheers!


Oleg Butuzov comments:

oops! code is broken!


Oleg Butuzov comments:

forgot i write there!

2010-05-09

Frank Mulder answers:

Probably the settings.

Go to:
Settings > Reading >
- Blog pages show at most <strong>XX posts</strong>
- Syndication feeds show the most recent <strong>XX posts</strong>

Set this to the same number as you Arras Theme settings.
That probably works


Lee Jackson comments:

I amended this a while back.

The Arras theme gives you options for displaying content.

The homepage structure is split into three sections. However, the default with Arras theme would duplicate posts within those sections so I amended the code somehow (can't remember how ;)).

Header: I display post 1 only (ie the latest post)
Second section: I display posts 2-7
Third Section: I display posts 8-onwards

Could this be the problem?


Frank Mulder comments:

The template shouldn't be the problem,
I remember having such a problem on another theme,
just editted the numbers in <strong>Settings > Reading</strong> and it worked afterwards.



<em>hmm, hopefully this is a reply to the right comments, but unclear.</em>

2010-05-09

Erez S answers:

Maybe you are using query_posts? If so,add this code to the end of the query before the );
&paged=".((get_query_var('paged')) ? get_query_var('paged') : 1)
So it would be something like that:
query_posts("category_name=somecat&paged=".((get_query_var('paged')) ? get_query_var('paged') : 1));
Enjoy


Lee Jackson comments:

What are query posts? I'm a bit of a novice!

;)


Erez S comments:

give me the index.php file of your template


Lee Jackson comments:

index.php is blank.

just re-downloaded Arras theme to double check and it's blank there too.




Erez S comments:

What files do you have in your theme directory?


Erez S comments:

wordpress.org/support/topic/348388


Erez S comments:

I have installed the theme and it is working great for me,so can you send me the theme you use after you edited it? And if you can provide me the FTP details it would be great

2010-05-09

Lew Ayotte answers:

Which version of the Arras theme are you using?


Lew Ayotte comments:

The latest release version 1.4.2 seems to work fine for me... can you private message me your WP UN/PW or include the code for your home.php file?

Thanks.
Lew