Hello everyone! Sometimes a situation where users WordPress want in the comments and posts to hide the date and time. To be honest, I do not know why many do, because in the search will still be displayed date contact information in the search engines. Moreover, if the date is displayed on your site, your visitors will be able to find out how relevant the information on your site.
Still, many hide this fact, and in this article we discuss how you can hide the time and date in the posts and comments WordPress.
How can I hide the date and time in the post?
To do this you need to edit single.php. You can download it via FTP, or can edit it via the admin console.
So we go in the Appearance Editor- in template is a file single.php and select it. Further search (Ctrl + F) we find the following line:
<? PHP the_date ( ) ; ?>
Or, this one:
<? PHP the_time ( 'F J, Y' ) ?>
Different templates may differ. So try two options. Once found it, comment out or remove the same. Also, you should comment out or remove the date display in the file index.php, commented-out line will look like this:
<! - <? PHP the_date ( ) ; ?> ->
How can I hide the date and time in the comments?
The principle seems to be just you need to file comment-template.php, which is located in the wp-includes. So you go into it, download the file and find the following code:
<? PHP / * translators: 1: date, 2: time * / printf( __ ( '% 1 $ s at
Comment on it, or delete, and then save the file and replace it on your server. That’s it, good luck to you and see you soon!