WordPress.org

Ready to get started?Download WordPress

Forums

Page Pagination Not working :( (14 posts)

  1. Hardeep Asrani
    Member
    Posted 1 year ago #

    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(); ?>
  2. sonai
    Member
    Posted 1 year ago #

    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.]

  3. Hardeep Asrani
    Member
    Posted 1 year ago #

    @sonai where to add this code?

  4. sonai
    Member
    Posted 1 year ago #

    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.]

  5. Hardeep Asrani
    Member
    Posted 1 year ago #

    @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

  6. sonai
    Member
    Posted 1 year ago #

  7. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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?

  8. sonai
    Member
    Posted 1 year ago #

    Hi,
    using "Pagination for Pages" plugin

  9. Hardeep Asrani
    Member
    Posted 1 year ago #

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

    @alchymyth yeah

  10. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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?

  11. Hardeep Asrani
    Member
    Posted 1 year ago #

    @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.”

  12. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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

  13. Hardeep Asrani
    Member
    Posted 1 year ago #

    @alchymyth let me try again...thanks

  14. Hardeep Asrani
    Member
    Posted 1 year ago #

    @alchymyth it's working!!! Thanks for help...I added more tags instead of that lol :p thanks for noticing that :)

Topic Closed

This topic has been closed to new replies.

About this Topic