# How to Change WooCommerce Default Sorting Text: A Beginner’s Guide
Want to customize the default sorting options in your WooCommerce store? Tired of seeing the generic “Sort by” text? This guide will walk you through changing that text, making your shop cleaner and more user-friendly. We’ll cover both beginner-friendly methods and explain the underlying logic.
Why Change the Default Sorting Text?
Imagine you’re shopping online for shoes. You see “Sort by: Default sorting, Sort by popularity, Sort by average rating…” It’s functional, but a bit bland, right? Changing this text can significantly impact the user experience:
- Improved Brand Consistency: Matching the sorting options to your store’s overall tone and vocabulary makes it feel more cohesive and professional.
- Enhanced Clarity: Replacing vague terms like “Default sorting” with something like “Featured Products” instantly clarifies the sorting method.
- Better User Engagement: Clear and concise language guides users towards what they’re looking for, boosting conversion rates.
- Access Plugin Settings: Navigate to your plugin’s settings page (the exact location varies depending on the plugin).
- Find WooCommerce Strings: Look for a section related to WooCommerce strings or translations.
- Locate Sorting Options: Find the strings associated with sorting options (“Sort by”, “Popularity”, “Price: low to high”, etc.).
- Change the Text: Replace the default text with your desired phrasing. Save the changes.
Method 1: Using the WooCommerce Multilingual Plugin (Easy, Recommended for Beginners)
This method is perfect if you’re already using a multilingual plugin like WPML or Polylang. These plugins often provide an interface to easily translate and modify default WooCommerce text strings, including sorting options.
Real-life Example: Let’s say your default “Sort by popularity” becomes “Shop Our Bestsellers.” This is far more engaging and descriptive.
This method requires no coding and is highly recommended for beginners who prioritize ease of use.
Method 2: Using a Child Theme and Custom Code (Advanced, Requires Coding Knowledge)
This method gives you complete control but requires a basic understanding of PHP and child themes. Always use a child theme to avoid losing your customizations when updating WooCommerce.
Step 1: Create a Child Theme
If you don’t have one already, create a child theme. This protects your customizations from being overwritten when WooCommerce updates.
Step 2: Locate the `woocommerce_get_catalog_ordering_args` Filter
This filter lets you modify the arguments used when displaying the sorting options. We’ll use it to change the labels.
Step 3: Add Custom Code to your `functions.php` file (in your child theme)
Add the following code to your child theme’s `functions.php` file:
add_filter( 'woocommerce_get_catalog_ordering_args', 'custom_woocommerce_ordering_args' ); function custom_woocommerce_ordering_args( $args ) { $args['order_by_value'] = array( 'menu_order' => __( 'Featured Products', 'woocommerce' ), // Change "Featured Products" to your desired text 'popularity' => __( 'Shop Our Bestsellers', 'woocommerce' ), // Change "Shop Our Bestsellers" to your desired text 'rating' => __( 'Top Rated', 'woocommerce' ), //Change "Top Rated" to your desired text 'price' => __( 'Price: Low to High', 'woocommerce' ), //Change "Price: Low to High" to your desired text 'price-desc' => __( 'Price: High to Low', 'woocommerce' ) //Change "Price: High to Low" to your desired text
);
return $args;
}
This code snippet changes the text displayed for each sorting option. Replace the placeholder text with your own. The `__( ‘Your Text’, ‘woocommerce’ )` function makes your text translatable if you’re using a translation plugin.
Step 4: Test and Save
Save your changes, and test your website to ensure the sorting options display the new text.
Conclusion
Changing the WooCommerce default sorting text is simple once you understand the available methods. Choose the method that best suits your technical skill level. Remember, clear and engaging language can dramatically improve the user experience and boost your sales. If you’re a beginner, start with the multilingual plugin method; if you’re comfortable with code, the child theme approach offers more customization options.