• Resolved Chitauri

    (@chitauri)


    Hello, I have a problem, I´d like add pagination comments without plugin to my raindrops theme , and I´ve find this post, It says that I have to replace “previous_comments_link and next_comments_link functions” in comments.php, for this code:

    div class="pagination">
        <?php paginate_comments_links(); ?>
    </div>

    I can´t find the exactly code that i have to replace.

    Any idea?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author nobita

    (@nobita)

    comments.php line:71

    delete below code.

    <?php
    		if ( get_comment_pages_count( ) > 1 && get_option( 'page_comments' ) ){ // Are there comments to navigate through?
    ?>
    		<div id="nav-below-comments" class="clearfix">
    			<span class="nav-previous">
    <?php
    			previous_comments_link(  '<span class="meta-nav">&larr;</span> '. esc_html__( 'Older Comments', 'Raindrops' ) );
    ?>
    			</span>
        		<span class="nav-next">
    <?php
    			next_comments_link( esc_html__( 'Newer Comments ', 'Raindrops' ). '<span class="meta-nav">&rarr;</span>' );
    ?>
    			</span>
    		</div>
    <?php
           } // check for comment navigation
    ?>

    replace from above to below

    <?php
    	if ( get_comment_pages_count( ) > 1 and
    		get_option( 'page_comments' ) and
    		function_exists('wp_simple_comments_pagination')
    	){
        		wp_simple_comments_pagination();
    
    	}
    ?>
    Thread Starter Chitauri

    (@chitauri)

    Thanks Nobita it works!

    Thread Starter Chitauri

    (@chitauri)

    But the pagination comment only see it at the bottom of the page, in the top ishow you a screenshot of my web, where only see Newer post and older post:

    http://img29.imageshack.us/img29/1329/gcmm.png

    At the bottom works perfectly:

    http://img191.imageshack.us/img191/517/itpv.png

    Thread Starter Chitauri

    (@chitauri)

    Nobita, I replace the code that you marke me:

    <?php
    		if ( get_comment_pages_count( ) > 1 && get_option( 'page_comments' ) ){ // Are there comments to navigate through?
    ?>
    		<div id="nav-below-comments" class="clearfix">
    			<span class="nav-previous">
    <?php
    			previous_comments_link(  '<span class="meta-nav">&larr;</span> '. esc_html__( 'Older Comments', 'Raindrops' ) );
    ?>
    			</span>
        		<span class="nav-next">
    <?php
    			next_comments_link( esc_html__( 'Newer Comments ', 'Raindrops' ). '<span class="meta-nav">&rarr;</span>' );
    ?>
    			</span>
    		</div>
    <?php
           } // check for comment navigation
    ?>

    for this:

    <div class="pagination">
        <?php paginate_comments_links(); ?>
    </div>

    Now I have paginate comments without Simple pagination plugin.

    Thread Starter Chitauri

    (@chitauri)

    Here the news screenshots of my web with pagination without plugin

    But the pagination comments only see it at the bottom of the page, in the top I show you a screenshot of my web, where only see Newer post and older post:

    http://img197.imageshack.us/img197/3742/e81.png

    At the bottom works perfectly:

    http://img845.imageshack.us/img845/4749/hxlb.png

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to add wordpress pages comments without a plugin?’ is closed to new replies.