Where is previous_comments_link and next_comments_link functions
<?php paginate_comments_links(); ?>
Here is the html comments code:
<?php
previous_comments_link( '<span class="meta-nav">←</span>'. esc_html__( 'Older Comments', 'Raindrops' ) );
?>
</span>
<span class="nav-next">
<?php
next_comments_link( esc_html__( 'Newer Comments', 'Raindrops' ). '<span class="meta-nav">→</span>' );
?>
</span>
</div>
<?php
Have I to replace all by:
<div class="pagination">
<?php paginate_comments_links(); ?>
</div>
Do not edit the theme itself. First create a child theme for your changes.
I´ve installed the code succesfully, the code i have to remplace was this:
<?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">←</span> '. esc_html__( 'Older Comments', 'Raindrops' ) );
?>
</span>
<span class="nav-next">
<?php
next_comments_link( esc_html__( 'Newer Comments ', 'Raindrops' ). '<span class="meta-nav">→</span>' );
?>
</span>
</div>
<?php
} // check for comment navigation
?>
I replaced for this:
<div class="pagination">
<?php paginate_comments_links(); ?>
</div>
Now It works perfectly
(@chitauri)
12 years, 8 months ago
I´ve read this post to add pages comments in wordpress without plugins, but I have doubts.
“Open your comments.php template file and add the following line where you want the comment pagination to appear.
Note: If you are currently using the previous_comments_link and next_comments_link functions, you may want to replace them with the pagination.”
Where is previous_comments_link and next_comments_link functions that I have to replace for the above code?
My website is:
http://www.falsalibertad.com/