Archived topic
Change Comment Layout
9 replies · Started by Sam on August 22, 2018
Hi team,
I would like to change the comments layout from the default GP child theme:
https://drive.google.com/file/d/1guqAUrnH2o-SIyhb8FpnPTYDNWjA_5Gw/view?usp=sharing
to this:
https://drive.google.com/file/d/1gFJZWTOI3QlobshGSbxpXmayzkodwwTY/view?usp=sharing
Please include CSS and PHP, thank you so much!
You could try this:
.comment-author-info .comment-author {
line-height: 50px;
color: red; /* Add correct color */
}
.entry-meta.comment-metadata {
display: none;
}
.comment-content {
padding: 10px 0;
border: 0;
}
Thanks David!
The Reply button now has gone missing though.
Any idea how to fix this?
https://drive.google.com/file/d/1j5TqVsc9tcct3DI-7ccLydMFrzHScy8I/view?usp=sharing
Note: I need the reply button to be the same as the reference site.
Thank you!
You could try something like this: https://generatepress.com/forums/topic/nested-comments-reply-link/#post-562866
Hi Tom,
Tried your code, but it didn't work. The meta is still the same.
Check this out:
https://drive.google.com/file/d/1MyG0YCzJAT_Qt-zLK2zjh_dUT792IcB6/view?usp=sharing
Thanks!
Is there any way we can get a link to the site?
Hi guys, I have updated the URL to the live site. please take a look. Thanks!
And just to confirm, this code is active on the site?:
add_filter( 'comment_text', 'tu_add_reply_link' );
function tu_add_reply_link( $text ) {
echo $text;
comment_reply_link();
}
Hi Tom,
Just readded it in. Thanks!
Let's try this instead:
add_filter( 'comment_text', function( $comment_text ) {
$reply = get_comment_reply_link();
return $comment_text . $reply;
} );