WordPress.org

Forums

Pagination for a post? (12 posts)

  1. lokjah
    Member
    Posted 10 years ago #

    Ive seen the awesome comment pagination plugin, but is there a way to paginate a wordpress post yet? say a really long post that you wanted to paginate? the more tag just doesnt cut it for me most of the time, and anyway once thats clicked the entire post comes into view....

    thanks.

  2. moshu
    Member
    Posted 10 years ago #

    Don't you have a <page> quicktag above the text area in the Write admin?

  3. lokjah
    Member
    Posted 10 years ago #

    lol ah man.. r u serious...ive been *not* staring at that for how long now?

  4. lokjah
    Member
    Posted 10 years ago #

    hmm ok yeah thats tight, now is there any way to:

    1) only see the comments for the post on the last page
    2) only be able to comment on the last page

    right now I can comment and read comments on each page of the post...

  5. Kafkaesqui

    Posted 10 years ago #

    I've been thinking on this, because I find having comments on all "pages" of a paginated post a bit annoying (Ok, I don't use post pagination all that often, but it still annoys me). What I've come up with is to modify the comments_template() tag like so:

    <?php if((1 == $numpages) || (get_query_var('page') == $numpages)) { comments_template(); } ?>

  6. lokjah
    Member
    Posted 10 years ago #

    thanks kafkaesqui gonna give that a try now!

  7. lokjah
    Member
    Posted 10 years ago #

    worked a charm! muchas gracias :D

  8. Arlo
    Member
    Posted 9 years ago #

    I've been trying to find this comments pagination plugin you speak of, no luck. Anyone?

  9. moshu
    Member
    Posted 9 years ago #

    Arlo, there is no plugin. Kaf posted above the code that should replace the original call for the comment template.

  10. moshu
    Member
    Posted 9 years ago #

    Oops, sorry, Arlo. I've misread your request. Maybe this is the plugin: http://www.keyvan.net/code/paged-comments/

  11. Arlo
    Member
    Posted 9 years ago #

    WOW! That plug in is perfect. Thanks!

  12. mlmedia
    Member
    Posted 9 years ago #

    Hello,

    This is my problem: I want to use pagination for posts and comments.

    I have started to use keyvan, but I would like to put it on the last page of my post only (so readers don't get distracted by the fun of the comments board). Anyway, I implemented Keyvan's plugin and tried to simultaneously implement the code above that forces the comment_template to the last page. But I'm having trouble getting them to work together.

    <?php if((1 == $numpages) || (get_query_var('page') == $numpages)) { comments_template(); } ?>

    <?php if (function_exists('paged_comments_template')) paged_comments_template(); else comments_template(); ?>

    This is what I came up with (it almost worked but the other comments pages disappear and go to the 1st post page):

    <?php if((1 == $numpages) || (get_query_var('page') == $numpages)) {
    if (function_exists('paged_comments_template')) paged_comments_template(); else comments_template();
    } ?>

    Don't laugh too hard, I'm very new at coding (a little over a month self-taught).

    Please help,

    I know this is a layup for most of you out there.

    Thanks in advance,
    Mike

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags