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

Next Page Function is Not working For Multiple Pages in Posts WordPress

  • SOLVED

*This is a repost. My other listing for whatever reason won't show up on this site. I haven't got a response from the webmasters yet as to why. because I am in need of answer immediately, I was forced to repost and then I will be asking for refund on other listing. Only respond to this post please*

I think that this is a simple question with a simple answer that I may be overlooking. I'm just being as descriptive as I possibly can but don't believe that the problem is as severe as this post might suggest based on its length. :-)

I'm trying to paginate my posts but the <!--nextpage--> function isn't working even though I have this in my theme's template.


<div class='pagenavi pagenavi-top'> <?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?> </div>


And you can see a test post that I had recently done where you can see the numbers for the pagination but when you click on the number, the page just refreshes instead of going to the next page.

Example post here: http://theurbantwist.com/topics/news/2011/01/31/man-charged-with-trying-to-blow-up-one-of-u-s-largest-mosques/

You will see the page numbers below the article. So by the page numbers appearing article, it would seem that everything was done correctly on my end.

And one last thing, how would I add the "previous page" and "next page" to the numbers as in this example below?

http://www.xxlmag.com/bangers/2011/01/xxls-sam-the-video-guy-eds-video-bangers-of-the-week-124-128/

I tried reading through the codex and couldn't figure it out.

Thanks

And here's the enitre code in my single.php file just in case you needed it.

<?php get_header(); ?>

<div id="topLeaderboard">

<?php advman_ad('Leader'); ?>
</div>

<?php include('featured_posts_slideshow.php') ?> <!--Adds Featured Posts -->

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<?php if(in_category ('from-the-bottom-up-fernando-quijano')) {?>

<div class="col-banner">

<img src="http://theurbantwist.com/online/wp-content/themes/yamidoo/images/the-word-pimp.jpg">

</div>
<?php }?>


<?php if(in_category ('the-most-hated-list-bryan-stewart')) {?>

<div class="col-banner">

<img src="http://theurbantwist.com/online/wp-content/themes/yamidoo/images/the-most-hated.png">

</div>
<?php }?>


<?php if(in_category ('the-speaker-box')) {?>

<div class="col-banner">

<img src="http://theurbantwist.com/online/wp-content/themes/yamidoo/images/the-speaker-box.png">

</div>
<?php }?>




<div id="title"><?php breadcrumbs_plus( $args ); ?>
<h1><?php the_title(); ?></h1>
</div>


<div class="post">

<div class="post" id="post-<?php the_ID(); ?>">

<small><?php echo get_avatar( get_the_author_id() , 35 ); ?> By <?php the_author_posts_link(); ?> on <?php the_time('F j, Y') ?> at <?php the_time() ?> | <?php comments_popup_link('No comments yet', '1 comment so far',
'% comments so far (is that a lot?)', 'comments-link', 'Comments are
off for this post'); ?> <?php edit_post_link( __('Edit'), ' | ', ''); ?>



</small><br />


<div style="clear:both;"></div>



<div id="socialicons">



<div style="float:left;padding-right:5px;"><?php if (function_exists('fbshare_manual')) echo fbshare_manual(); ?></div>

<div style="float:left;padding-right:5px;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="theurbantwist">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>


<div style="float:left;padding-right:5px;margin-left:-15px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1"></script></div>

<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>
<!-- Compact Button -->
<a class="DiggThisButton DiggCompact"></a>


</div>

<div style="clear:both;"></div>


<!-- surphace start -->

<?php the_content('<p>Read the rest of this entry &raquo;</p>'); ?>

<div class='pagenavi pagenavi-top'> <?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?> </div>

<!-- surphace end -->

<div id="social-headlines">
<h7>Get The Urban Twist on
<a href="http://facebook.com/theurbantwist" target="_blank">Facebook</a> and
<a href="http://twitter.com/theurbantwist" target="_blank">Twitter</a>!</h7>
<br><br><h7>Don't Forget to Sign Up For
Our Brand New <a href="http://theurbantwist.com/newsletter/" target="_blank">Newsletter</a>!</h7>
</div>


<div id="like-story">
<h1>Do You Like This Story?</h1>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; margin-top:-10px; width:450px; height:30px;"></iframe>
</div>


<div id="outbrain"></div>


<div id="ad-story">
<?php advman_ad('Sidebar Top'); ?>
</div>


<div style="clear:both;"></div>


<small><?php the_tags( __( '<span class="tag-links">Tags: ', 'wpbx' ), ", ", "</span>\n" ) ?></small>


<div class="clear"></div>


</div>




<div class="clear"></div>



<?php comments_template(); ?>


<?php endwhile; else: ?>

<p>Sorry, no posts matched your criteria.</p>

<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Answers (3)

2011-02-01

Peter Michael answers:

Does it work when you disable the WP Pagenavi plugin?


Brennen Jones comments:

Unfortunately not. I deactivated all plugins that I have and it still doesn't work. I even deleted my .htaccess file and reinstalled it. Still doesn't work.

2011-01-31

Dan | gteh answers:

I've seen this happen on some servers where there was a problem with permalinks/.htaccess .

Just out of curiosity, can you temporarily turn off the friendly permalinks and re-enable the default way of index.php?p=12345

then see if it works?


Brennen Jones comments:

I just tried that. It still didn't work.

2011-02-01

Marvin Shaker answers:

Update Your Permalink.

Make Sure your .htaccess is writable.

The Problem Might Be Your Template Try Changing it

Try this <?php wp_link_pages( $args ); ?>



Brennen Jones comments:

Thanks my man, but I've already tried that. Just doesn't work. Peter above gave me some pointers and it looks like my host may be the culprit.