2 Easy Way to Remove Date and Time from Comments in WordPress

Have you ever desired to remove Date and Time From Comments in WordPress? If yes! Then how you did it, and if not then come along with us here we are performing the same. Feel free to share and comment.

In no time bloggers have been wanting to remove comment dates and time. They do this, to make their comments look fresh and evergreen to the users.

Thus, this is what we are elaborating here! Keep reading…

Remove Date and Time from Comments

Should You Remove Date and Time from Comments in WordPress?

Why not and why should, here we elaborate: Some of the users believe and think that hiding date and time in WordPress. Will absolutely prevent their blogs from looking dated. Thus, they too think that they are improving their WordPress site SEO and search engine rankings in the cooperative field.

Search engine rankings are done by the web crawlers which are type of “bot” that visits websites on the internet. These bots “crawl” across the web to help search engines like Google index and rank the billions of pages on the internet. These search engine spiders helps to understand the page in a better way.

You can gain an advantage against the pages which don’t validate in the search engine results pages SERP listings. It shows that you have care and concern about your website. Validation of your web page means that you have made a good effort for a structured web page. That’s a huge plus for search engines and it may boost your rankings up.

Where Search Engine Optimization option allows you to manage SEO settings and it shows search analytics to you. Where the search engine is a service which allows all internet user to search for any content, query, and product throughout the world wide web.

Hence, we completely disagree with this statement. Whereas, we think and believe that removing dates and times can be quite problematic for your site.

Further, we will be writing on why shouldn’t we remove dates from WordPress posts. The articles posted by the admin of a WordPress site are called posts. These are also called blogs. Posts are arranged in reverse sequential order in WordPress. So, keep looking on our site www.wpglobalsupport.com for more updates.

Similarly, same arguments are true for your WordPress comments. WordPress Comments allow the visitor’s of your website to have a discussion with you and each other. When you activate the comment option on your page or post, WordPress inserts several text boxes after your content where the users can submit their comments.

Hence, removing them from comments will hide important information. Which might make the older comments look odd on your website.

Somehow, we understand that some users may be using comments differently. Than that of normal web comments. Like: On a WordPress intranet or a web application from your PC.

Whereas, in such cases, they may need to the same from WordPress comments section to meet their requirements in overall. Further, move towards the method of removing the same.

Method 1. Removing Date and Time from Comments by Using Code

For this! Firstly, you need to edit your WordPress theme files from your site. After that, you wish to add the following code to your theme’s functions.php file or in a site-specific plugin from your PC.

// Remove comment date

function wpb_remove_comment_date($date, $d, $comment)
{
if ( !is_admin() )
{
return;
}
else
{
return $date;
}
}
add_filter( ‘get_comment_date’, ‘wpb_remove_comment_date’, 10, 3);

// Remove comment time

function wpb_remove_comment_time($date, $d, $comment)
{
if ( !is_admin() )
{
return;
}
else
{
return $date;
}
}
add_filter( ‘get_comment_time’, ‘wpb_remove_comment_time’, 10, 3);

You are all set, now you may visit any post with comments on your WordPress Website. And you will look that date and time are no longer on your site.

Often, you may also find preposition words like “at” or “posted-on” just in front of the user role.

However, to remove them, you need to point out the cursor to those words. And press the right-click to select/choose “Inspect” from the browser menu of your website.

comment class
Remove Date and Time from Comments

After that, you need to copy the CSS class. Where CSS stands for Cascading Style Sheet, these are the documents which contain the styling rules that can be applied to HTML or XML, (along with some structural formats). Which is used in the surrounding div or span around date and time in the theme section of your site?

Consequently, you wish to add the following custom CSS to your theme. Thus, to hide such information:

.comment-time
{
display:none;
}

Never forget to save out the changes. And let’s have a look at your WordPress Website Comments to see it in action.

That’s all! You have successfully done your job. However, please note that this method doesn’t remove comment dates and time from your WordPress database.

Hence, removing the code will immediately start displaying date and time.

Method 2. Removing Date and Time from Comments by Using Plugin

For this, we will use the most popular plugin named Better Recent Comments. The very first thing you need to do is just install and activate the plugin. However, if you are not very aware of installing the plugin. Then feel free to move along with our blog on how to install a WordPress Plugin.

After that, follow the path illustrated as follows: Appearance >> Widgets on your Website dashboard.

comments widget
Remove Date and Time from Comments

From here, drag the better recent comments widget to any section of your choice. And you will see the option to select which element it should include. Here, you may select the number of comments. Which you want to display in your comment section. However, if you want to keep the widget closer to the default comment sections of WordPress. Then, set a large number.

On the other hand, if you want to display your updated comment section elsewhere on your page. Then you will need to use or follow the plugins shortcode system.

Thus, to do so, just open the WordPress Editor and paste the code illustrated below:

[better_recent_comments number=”50″ format=”{avatar} {post} – {comment}”]

Now, you are all set! Further, have a look at the comment section of your site. You will see the date and time has been removed from there.

CONCLUSION

Here, in this blog, we have discussed the 2 Easy way to Remove Date and Time from Comments in WordPress.

Often we concluded, should you remove the same from comments in WordPress. And the process of Removing the same. The process included two methods which are as follows:

1. Removing Date and Time from Comments by Using Code.
2. Removing Date and Time from Comments by Using Plugin.

They do add value to any blog post. And, this leads to the end of the blog.

We hope this blog helped you. If you found the blog useful, do not forget to use the comment section provided below. Also, share the blog with your peers. You are on your way to getting more exposure.

If you are looking for the best support for WordPress Migration so you can talk to our Experts by dialling our Toll-Free number + 1 844 275 0975. One of our skilled professional expert will guide you instantly.

Read More Blogs:



Leave a Reply

Call Us