How to Remove Dates from WooCommerce Reviews: A Beginner’s Guide
WooCommerce reviews are a fantastic way to build trust and social proof for your products. Seeing genuine feedback from other customers can significantly influence purchasing decisions. However, sometimes you might want to remove the dates from your WooCommerce reviews. Perhaps you’re focusing on evergreen products, and the dates make the reviews feel outdated. Or maybe you’re just aiming for a cleaner, less cluttered look.
Don’t worry, you don’t need to be a coding wizard to do this! This guide will walk you through the process step-by-step. We’ll cover the “why” behind each method, making sure you understand what you’re doing and why it works.
Why Remove Dates from Reviews?
Before we dive in, let’s quickly touch on why you might want to remove the dates. Here are a few common reasons:
- Evergreen Products: If you sell products that don’t change much over time, reviews from several years ago are still relevant. Removing the date helps prevent potential customers from thinking the review is outdated. Imagine you’re selling a classic t-shirt design; a review from 2020 is just as valuable as one from yesterday.
- Clean Aesthetics: Sometimes, a cleaner design can improve the user experience. Removing the date can declutter the review section and make it more visually appealing.
- Focus on Content: You might want the focus to be solely on the review content itself, rather than when it was written. This ensures potential customers concentrate on the product feedback, not the time elapsed.
- Option 1 (Directly): Go to *Appearance > Theme Editor* in your WordPress dashboard. Locate the `functions.php` file (usually in the right sidebar). Proceed with caution, as any errors here could break your site!
- Option 2 (Child Theme): The safest way is to create a child theme. This isolates your changes from the main theme, so updates won’t overwrite your custom code. Google “how to create a wordpress child theme” for detailed instructions. Then edit the `functions.php` file in your child theme.
- Option 3 (Code Snippets Plugin): Install a plugin like “Code Snippets.” This is the most beginner-friendly option. It allows you to add code without directly modifying theme files.
Method 1: Using a Code Snippet (Recommended for Control)
This method involves adding a small piece of code to your theme’s `functions.php` file or using a code snippets plugin. This is generally the recommended approach because it offers flexibility and doesn’t rely on potentially bloated plugins.
Important: Always back up your website before making any code changes! This ensures you can easily restore your site if anything goes wrong.
1. Access your `functions.php` file:
2. Add the following code snippet:
add_filter( 'woocommerce_review_display_comment_date', 'remove_woocommerce_review_date', 10, 1 ); function remove_woocommerce_review_date() { return ''; }
3. Explanation:
- `add_filter( ‘woocommerce_review_display_comment_date’, ‘remove_woocommerce_review_date’, 10, 1 );`: This line tells WordPress to “hook into” the function that displays the review date (`woocommerce_review_display_comment_date`) and apply our custom function (`remove_woocommerce_review_date`). The `10` sets the priority (default) and `1` specifies the number of arguments the hooked function receives.
- `function remove_woocommerce_review_date() { return ”; }`: This defines our custom function, `remove_woocommerce_review_date`. All it does is return an empty string (`”`), effectively removing the date.
4. Save the file (or activate the snippet) and check your product pages. The dates should now be gone from your reviews!
Example: Imagine you’re selling a popular coffee mug. The code snippet above will ensure that all reviews, regardless of when they were written, display without a date, preventing potential customers from dismissing older, but still relevant, reviews.
Method 2: Using CSS (Limited Functionality)
This method uses CSS to visually hide the date. While simpler, it’s important to understand its limitations: the date is still technically present in the HTML code, it’s just hidden from view. This might not be ideal for SEO or accessibility.
1. Access your WordPress Customizer: Go to *Appearance > Customize* in your WordPress dashboard.
2. Find the “Additional CSS” section: This is usually located at the bottom of the Customizer options.
3. Add the following CSS code:
.woocommerce .comment-time {
display: none !important;
}
4. Explanation:
- `.woocommerce .comment-time`: This CSS selector targets the HTML element that contains the review date within WooCommerce reviews.
- `display: none !important;`: This CSS property hides the element from view. The `!important` ensures that this rule overrides any other CSS rules that might be affecting the date’s display.
5. Publish your changes and check your product pages. The dates should be visually hidden.
Example: Let’s say you sell handmade jewelry. The CSS code will make the review section appear cleaner and more modern by hiding the dates. However, search engines might still detect the date in the underlying code.
Method 3: Using a WooCommerce Plugin (Simplest, But Can Be Overkill)
Several WooCommerce plugins offer options to customize reviews, including removing dates. While this is the easiest method, be mindful of plugin bloat. Too many plugins can slow down your website.
1. Search for a “WooCommerce Review Customization” plugin: In your WordPress dashboard, go to *Plugins > Add New* and search for relevant keywords. Examples include “WooCommerce Product Reviews Pro” or “Customer Reviews for WooCommerce.”
2. Install and activate the plugin: Choose a reputable plugin with good reviews and a recent update.
3. Configure the plugin: Most plugins will have a settings page where you can control various aspects of the reviews, including the date display. Look for an option to hide or remove the date.
Example: Imagine you sell digital courses. A review customization plugin might allow you to not only remove dates but also add additional features like image uploads or star ratings, making the review section more engaging.
Choosing the Right Method
- Code Snippet (Method 1): Recommended for most users. Offers flexibility and control without relying on extra plugins.
- CSS (Method 2): Simplest for quickly hiding the date visually, but has limitations for SEO and accessibility.
- Plugin (Method 3): Easiest for beginners, but can lead to plugin bloat if you only need to remove the date.
Important Considerations:
- Accessibility: If you’re using CSS to hide the date, consider the impact on users with screen readers. They might still be able to access the date, which could be confusing.
- SEO: While removing the date can improve the look and feel of your site, ensure that it doesn’t negatively impact your SEO. Method 1 (code snippet) is the cleanest solution as it removes the date completely from the code.
By following these methods, you can easily remove dates from WooCommerce reviews and create a more appealing and effective review section for your online store. Remember to choose the method that best suits your technical skill and the specific needs of your website. Good luck!