WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: WP-Paginate] Install question (5 posts)

  1. DaveBarrack
    Member
    Posted 2 years ago #

    This is a php question that maybe can be answered by anyone familiar with code.

    The install instructions say "Replace your existing previous_comments_link() and next_comments_link() code block with the following: `<?php if(function_exists('wp_paginate_comments')) {
    wp_paginate_comments(); } ?>`"

    Does that mean replace:

    <div class="commentnav">
    				<div class="commentnav-right"><?php next_comments_link(__('Next Comments &uarr;','comicpress')) ?></div>
    				<div class="commentnav-left"><?php previous_comments_link(__('&darr; Previous Comments','comicpress')) ?></div>

    So it looks like this:

    <div class="commentnav">
       <div class="commentnav-right"><?php if(function_exists('wp_paginate_comments')) {
        wp_paginate_comments();
    } ?></div>
       <div class="commentnav-left"><?php if(function_exists('wp_paginate_comments')) {
        wp_paginate_comments(); } ?>
    </div>

    Or this:

    <div class="commentnav">
       <div class="commentnav-right"><?php if(function_exists('wp_paginate_comments')) {
        wp_paginate_comments(); } ?>
    </div>

    I'm sorry if this is a dumb question but I know enough about php to know that a single comma or period in the wrong place can break everything. Seeing EXACTLY what the finished product should look like is the only way us non-programmers can be sure we're doing it right.

  2. Eric Martin
    Member
    Posted 2 years ago #

    Hello,

    The following should do the trick:

    <div class="commentnav">
       <?php if(function_exists('wp_paginate_comments')) {wp_paginate_comments(); } ?>
    </div>
  3. DaveBarrack
    Member
    Posted 2 years ago #

    Ah, great thanks.

  4. LauraBelle64
    Member
    Posted 2 years ago #

    I apologize, Eric, for popping up all over the place with the same question, but am trying to get an answer for this, and I wasn't sure where you checked regularly. I am using a theme, Icetech, that seems to have used and copied the pagination code you published in 2009. I can't get it to paginate. I tried downloading this plugin, but I couldn't install it as I don't have the same copy to replace, as it was already replaced with that code using the "emm-paginate." If I replaced "emm-paginate" with "wp-paginate," and activated this plugin, would it fix my problem?

  5. ndree
    Member
    Posted 2 years ago #

    Hi Eric,
    I'm creating my own theme and i can't use the pagination properly in my specific page. But it seemed to work in the search page, can you help?

    while this is the code of the specific page:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    and the nav.php is:
    <div><?php wp_paginate(); ?></div>

    something i missed? i'm new to WP though.

Topic Closed

This topic has been closed to new replies.

About this Topic