Customizing a WP site to fit your specific needs and desires often involves tweaking various elements, including the comment section. One corresponding customization is removing the date and time from WordPress comments. This guide will show you how to achieve a streamlined, timeless look on your site by removing these timestamps. Our directions are based on attempted and tested methods, ensuring a trouble-free and effective implementation.
Why Eliminate Date and Time from “WP” Remarks?
Some users have confidence that hiding the date and time in WP will prevent their articles from looking dated, potentially upgrading their SEO and search engine rankings. However, opinions on this matter vary. In this zone, we will take a look at the potential benefits and drawbacks of removing timestamps from comments.
Potential Benefits
- Timeless Aesthetics: By eliminating dates and times, comments can appear more timeless, creating a sleek and modern look. This can be particularly beneficial for evergreen content that remains relevant over long periods.
- Encouraging Engagement: Without timestamps, comments may focus more on the content on second thought than the age of the post. Readers might be more preferred to engage if they perceive the discussion as ongoing and relevant.
- Professional Appearance: For websites that serve as portfolios, showcases, or company blogs, a date-free comment section can look more polished and professional.
Potential Drawbacks
- Loss of Context: Timestamps provide valuable context about when a comment was made. Removing them might make it difficult for readers to follow the timeline of the discussion.
- Perceived Deception: Some users might feel misled if they realize that dates and times have been intentionally removed, potentially affecting the trustworthiness of the site.
- SEO Implications: Contrary to some beliefs, removing dates and times can sometimes negatively impact SEO. Explore engines value fresh and updated content and timestamps might indicate the recency and relevance of discussions.
Balancing Aesthetics and Usefulness
It is most important to strike a balance between aesthetics and usefulness. While a timeless look might be appealing it’s crucial not to sacrifice the usability and trustworthiness of your site. Think about the specific needs of your audience and the purpose of your site deciding whether to remove dates and times from comments.
How to Bring Out the Date and Time from the WP Remark
If you decide that removing dates and times from comments aligns with your goals, there are several methods to achieve this. One of the protected and most effective ways is by using custom code snippets.
Using WPCode to Add Custom Code
- WPCode: It is a powerful WP plugin that allows you to add custom code snippets to your site without modifying your theme’s core files. This approach minimizes the risk of making your website inaccessible due to coding errors.
- Install and Activate WPCode: Begin by installing and activating the WPCode plugin. For detailed requirements, you can refer to our beginner’s guide on how to install a WordPress plugin.
- Adding a New Snippet: { Navigate to the Code Snippets + Add Snippet page from the WordPress administrator offshoot. Enter the ‘Use excerpts’ button under the ‘Add Your Custom Code (New Snippet) } option
- Open Custom particle: On the “open Custom Snippet” page, start by typing a name for the code snatch. “‘ PHP-Snippet” opinion code type dropdown menu.
Enter the Code: Copy and Paste the following Code into the Code advance Showing Box:
// 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);
Arrange Insertion Mode: Scroll down to the ‘Insertion’ section and choose the ‘Auto Insert’ mode ensuring the code executes automatically on your site.
Activate and Save: Toggle Switching to ‘Active’ and Click the ‘Save Snippet’ Button to Store Your Settings.
Once these steps are completed, visit your website to see the date and time removed from your WordPress comments. Note that this method does not delete the dates and times from your WordPress database; removing the code will restore the timestamps.
Potential Use Cases for Removing Timestamps
- While removing dates and times from comments can be advantageous in certain contexts, it’s essential to consider specific use cases where this approach might be particularly beneficial.
- Corporate Intranets: For internal company communication platforms, where comments serve as collaborative notes rather than public discussions, removing timestamps can make the interface cleaner and less cluttered.
- Web Applications: In web applications where comments are used for feedback or user input rather than traditional blogging, the exact timing of comments may be less relevant.
- Static Content Sites: Websites with static content that doesn’t change frequently, such as galleries, portfolios, or informational pages, may benefit from a timeless comment section.
Alternative Approaches
- If you are doubtful about removing timestamps entirely, think about these alternative approaches to maintain a balance between aesthetics and functionality.
- CSS Customization: Instead of removing timestamps, you can use CSS to style them in a way that minimizes their prominence. This approach retains the context while reducing visual clutter.
.comment-time, .comment-date { display: none; }
Conditional Display: Use conditional logic to display timestamps only for recent comments. To give an example, you could show the date and time for comments made within the last 30 days and hide them for older comments.
Tooltip Display: Another approach is to hide the timestamps by default but display them as a tooltip when a user hovers over the comment. This way, the information is available without cluttering the interface.
.comment-time, .comment-date { visibility: hidden; } .comment:hover .comment-time, .comment:hover .comment-date { visibility: visible; }
Removing Author Names from Posts
- In addition to removing dates and times from comments, you might also consider removing author names from posts, especially if you run a multi-author blog or manage guest bloggers. This can create a more uniform appearance and focus attention on the content rather than the author.
- Using WPCode for Author Names: Similar to removing timestamps, you can use WPCode to add a CSS code snippet to your website.
.post-author { display: none; }
Su[pplimentary Customizations: WPCode allows you to add various other customizations to your site like hiding category names, tags, or other metadata that you may find needless for your audience.
Conclusion
Eliminating the date and time from WP comments can help achieve a streamlined, timeless look on your site, potentially enhancing user engagement and site aesthetics. However, it’s important to cautiously consider the potential drawbacks and ensure that this customization aligns with your site’s goals and audience needs.
By using WPCode to safely add custom code snippets, you can easily implement this change without risking your site’s functionality. Additionally, exploring alternative approaches and related customizations, such as removing author names, can help you create a cohesive and professional-looking website.
Hope this comprehensive guide has provided you with the information you need to make informed decisions about customizing your WordPress comment section. If you have any further questions or need assistance, feel free to explore our other tutorials and resources.
For more details on related topics, check out our tutorials on how to add a dynamic copyright date in the WordPress footer and our list of must-have WordPress plugins for business websites.
Additional Resources
- Aprentice’s Guide to Installing a WP Plugin: Comprehensive requirements on how to install and activate plugins on your WP site.
- Why You Should Not Separate Dates from WP Posts: An in-depth article discussing the possible downsides of removing dates from posts.
- How to Remove Author Names from WP Posts: Step-by-step guide to separate author names from your blog posts for a more invariable aspect.
- Must-Have WP Plugins for Business Websites: An edited list of necessary plugins enhancing the usefulness and performance of your business website.
- By following this guide, you can tailor your WordPress site to better meet your needs and preferences, creating a more engaging and aesthetically pleasing user experience.
Developer at WPCarePoint
Booking for 30m Free Consultation on Google Meeting: Click here for an appointment today.
contact@wpcarepoint.com
www.wpcarepoint.com