Archived topic
Nested comments not working
9 replies · Started by George on April 9, 2018
I have nested comments 4 levels deep enabled. However no "Reply" button shows up below a comment, just the option to post a new comment. How do I enable the replies and the nesting? Here is a page as an example (look at the last comment - it used to work previously, but not anymore):
https://www.shamakern.com/relationships-in-thailand-part-10/
You have this CSS added:
.comment-metadata {
display: none;
}
If you remove it, the reply link will come back.
This CSS is meant to hide the date of the comments. Is there another way to hide the comment date and keeping the reply functionality at the same time?
For sure.
Remove that CSS, then add this CSS:
.comment-metadata > a {
display: none;
}
Then add this PHP:
add_filter( 'comment_reply_link_args', 'tu_remove_reply_bar' );
function tu_remove_reply_bar( $args ) {
$args['before'] = '<span class="reply">';
return $args;
}
Where do I add this PHP?
This should help: https://docs.generatepress.com/article/adding-php/
Thank you.
I have another site, thaihealingmassage.com, where I used this CSS to get rid of the comment date:
/*hide date on comments*/
.entry-meta.comment-metadata time {
display: none;
}
There is no additional PHP, and it had the desired effect of hiding the comment date, and the reply button still shows up.
I tried the same CSS on the shamakern.com site, and it does hide the comment date, but it also hides the reply button. I don't know why the two GP sites react differently to the same CSS.
Is it possible to add the PHP which you recommended in the GP hooks section, and if so, where?
The PHP removes the slash before the word "Reply".
It can only be added using one of the methods here: https://docs.generatepress.com/article/adding-php/
The Code Snippets plugin is probably the easiest way :)
I followed your suggestions, and now it is working correctly. Thank you.
You're welcome :)