Archived topic
Removing date & time from comments
8 replies · Started by Anonymous on September 16, 2014
How do I remove date and time from comments? also when i reply to people as a comment it says my name is ADMIN can i change it?
thanks in advance.
Hi Mike,
This CSS should remove the date from comments:
.comment-metadata a {
display: none;
}
.comment-metadata .reply {
color: transparent;
}
.comment-metadata .reply a {
display: inline-block;
}
Let me know if that works or not.
As for your name, if you go to "Users > Your Profile", you can edit the name that's displayed publicly.
Tom.
It worked thank you sooo much! you guys are great!!!
Hi Tom,
How about removing it entirely from your page. removing it for user as well as for search engine.
Regards
Maybe try a plugin like this: https://en-ca.wordpress.org/plugins/hide-wp-comment-author-link/
Hi,
I tried this css,
.comment-metadata a {
display: none;
}
.comment-metadata .reply {
color: transparent;
}
.comment-metadata .reply a {
display: inline-block;
}
[IMG]http://i64.tinypic.com/2vvjpsl.png[/IMG]
[IMG]http://i65.tinypic.com/qp5aj6.png[/IMG]
See the images.
How can i take out the timestamp and the additional |
Even if i log out from admin,
it still appears weirdly.
[IMG]http://i65.tinypic.com/2q9xque.png[/IMG]
Hmm, unfortunately to do that you would need to overwrite the entire comments function: https://github.com/tomusborne/generatepress/blob/1.3.40/inc/template-tags.php#L110-L169
Adding that function to your child theme/custom plugin/Code Snippets plugin (including the function_exists wrapper) will allow you to make changes to it.
Hi,
So you are saying it is not possible to remove the comment metadata fully.
and maybe just place the edit/reply button beneath the comment?
Like this,
[IMG]http://i63.tinypic.com/25zl8nt.png[/IMG]
Regards
By overwriting the generate_comment() function, you can remove/add/change whatever you like.
So you would paste that entire function highlighted into your child theme functions.php/custom plugin/Code Snippets plugin, then make your adjustments.
That way you can remove the bar: https://github.com/tomusborne/generatepress/blob/1.3.40/inc/template-tags.php#L144
And the time stamp: https://github.com/tomusborne/generatepress/blob/1.3.40/inc/template-tags.php#L141