WordPress.org

Support

Support » Themes and Templates » Page Pagination Not working :(

Page Pagination Not working :(

  • Hardeep Asrani

    @hardeepasrani

    Support Team Volunteer

    Hey guys, I don’t know why but pagination is not working on my theme canyon.

    here is full script of my single.php page

    <?php get_header(); ?>
    
    <div id="content" >
    
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="post" id="post-<?php the_ID(); ?>">
    
    	<div class="title">
    		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    	</div>
    	<div class="postmeta">
    		<span class="pmet">Posted by <?php the_author_posts_link(); ?>  on <?php the_time('M - j - Y'); ?> </span>
    	</div>
    	<div class="entry">
    		<?php the_content('Read the rest of this entry &raquo;'); ?>
    		<div class="clear"></div>
    		<?php wp_link_pages(array('before' => '<p><strong>Pages: </strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    	</div>
    
    	<div class="titlemeta clearfix">
    		<span class="categori"> Categories: <?php the_category(', '); ?>   </span>
    
    	</div>
    </div>
    
    <?php comments_template(); ?>
    <?php endwhile; endif; ?>
    </div>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi,

    use this code on your templates,

    <nav id="nav-single">
                            <span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'twentyeleven' ) ); ?></span>
                            <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></span>
                        </nav><!-- #nav-single -->

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Hardeep Asrani

    @hardeepasrani

    Support Team Volunteer

    @sonai where to add this code?

    Hi,
    i have include my codes on your template file…

    <div id="content" >
    
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="post" id="post-<?php the_ID(); ?>">
    
    	<div class="title">
    		<h2><a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    	</div>
    
    <nav id="nav-single">
                            <span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'twentyeleven' ) ); ?></span>
                            <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></span>
                        </nav><!-- #nav-single -->
    
    	<div class="postmeta">
    		<span class="pmet">Posted by <?php the_author_posts_link(); ?>  on <?php the_time('M - j - Y'); ?> </span>
    	</div>
    	<div class="entry">
    		<?php the_content('Read the rest of this entry »'); ?>
    		<div class="clear"></div>
    		<?php wp_link_pages(array('before' => '<p><strong>Pages: </strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    	</div>
    
    	<div class="titlemeta clearfix">
    		<span class="categori"> Categories: <?php the_category(', '); ?>   </span>
    
    	</div>
    </div>
    
    <?php comments_template(); ?>
    <?php endwhile; endif; ?>
    </div>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    [Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

    Hardeep Asrani

    @hardeepasrani

    Support Team Volunteer

    @sonai WAIT WAIT WAIT…. Post Pagination… I mean code to split a post. This one: http://www.wpbeginner.com/wp-tutorials/how-to-split-wordpress-posts-into-multiple-pages/

    By the way, it would be nice if you could help me with this topic:
    http://wordpress.org/support/topic/need-admin-bars-full-code?replies=1#post-4157746

    Michael

    @alchymyth

    Forum Moderator

    pagination is not working on my theme canyon

    what exactly is the problem?
    can you post a link to a page with that problem?

    are you using <!--nextpage--> in the post’s content?

    if the theme is not from http://wordpress.org/extend/themes/, have you contacted the theme’s developer/provider for support?

    Hi,
    using “Pagination for Pages” plugin

    Hardeep Asrani

    @hardeepasrani

    Support Team Volunteer

    @sonai that link didn’t helped me at lot.

    @alchymyth yeah

    Michael

    @alchymyth

    Forum Moderator

    yeah

    not really a useful answer to my questions;

    please provide more details:
    – what exactly is the problem?
    – can you post a link to a page with that problem?

    Hardeep Asrani

    @hardeepasrani

    Support Team Volunteer

    @alchymyth I added that more than on this post: http://www.wwefansnation.com/2013/05/mickie-james-speaks-playing-heel-mentioned-trish-stratus-hof/

    It’s not working…it’s not showing page navigation, full post is appearing on this page.

    I added <!–nextpage–> tag below following line:

    her and wrestle in final match, that was awesome.”

    Michael

    @alchymyth

    Forum Moderator

    you seem to have added the ‘more-tag’ in that position; there is no race of any <!--nextpage--> code;

    you could try to add the <!–nextpage–> using the ‘text’ setting of the editor;

    or possibly try to use this plugin to enter the ‘nextpage-tag’
    http://wordpress.org/extend/plugins/nextpage-buttons/ (don’t worry about the warning- it is still working fine)

    related http://codex.wordpress.org/Styling_Page-Links

    Hardeep Asrani

    @hardeepasrani

    Support Team Volunteer

    @alchymyth let me try again…thanks

    Hardeep Asrani

    @hardeepasrani

    Support Team Volunteer

    @alchymyth it’s working!!! Thanks for help…I added more tags instead of that lol :p thanks for noticing that 🙂

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Page Pagination Not working :(’ is closed to new replies.
Skip to toolbar