WordPress.org

Ready to get started?Download WordPress

Forums

Feauture Request:: Page Links on Paged Comments (6 posts)

  1. Jonas Grumby
    Member
    Posted 4 years ago #

    It's great that the WP core now supports the ability to break up comments into pages on the user side.

    Now what would be really great would be to have links on the user side like you get in the admin that allow you to jump to to a specific page of comments, or straight to the last page, etc.

    Thanks

  2. Jonas Grumby
    Member
    Posted 4 years ago #

    Come to think of it, that would have to be written into the theme...

    Anybody know how to do it?

    Thanks

  3. Yojance
    Member
    Posted 4 years ago #

    Are you talking about previous comments link and next comments link

  4. Jonas Grumby
    Member
    Posted 4 years ago #

    Yes, but instead of just having links to the previous and next page I'm wondering if there's a way to jump to a specific page or go straight to the first or last page from any page (like you can in admin).

    I can hard-code it into the comments.php but it would be nice to have a way for the theme to generate those links automatically.

    Thanks

  5. richarduk
    Member
    Posted 4 years ago #

    From my notes:

    <div class="comment-navigation">
    <p class="page-numbers">
     <?php paginate_comments_links(); ?>
     </p>
     </div><!--Close comment-navigation-->
    
    The above creates numbered links to paginated comments e.g 1 2 3  but       <?php paginate_comments_links(); ?>    is not well-documented. See  http://codex.wordpress.org/Template_Tags/paginate_comments_links 
    
    /*LIST OF PAGE NUMBERS INSTEAD OF LINKS*/
    
    div.comment-navigation {width:100%;margin:30px 0 30px 0;padding:0;overflow:auto;border:0;}
    
    p.page-numbers {font-size;1.2em;text-align:center;}
    
    a.page-numbers:link{text-align:center;letter-spacing:50px;color:red;}
    a.page-numbers:visited{text-align:center;letter-spacing:50px;color:red;}
    a.page-numbers:hover{text-align:center;letter-spacing:50px;color:red;}
    
    /* Make sure this comes after a.page-numbers so that this letter spacing over-rides previous letter-spacing*/
    a.prev:link {letter-spacing:0;color:red;text-decoration:none;}
    a.prev:visited {letter-spacing:0;color:red;text-decoration:none;}
    a.prev:hover {letter-spacing:0;color:red;text-decoration:none;}
    
    /* Make sure this comes after a.page-numbers so that this letter spacing over-rides previous letter-spacing*/
    a.next:link {letter-spacing:0;color:red;text-decoration:none;}
    a.next:visited {letter-spacing:0;color:red;text-decoration:none;}
    a.next:hover {letter-spacing:0;color:red;text-decoration:none;}
    
    span.page-numbers {font-style:normal;letter-spacing:50px;}
    span.current {color:black;}
  6. Jonas Grumby
    Member
    Posted 4 years ago #

    Wow thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic