Unfortunately due to other commitments, we are no longer able to provide support for these themes.

All our themes are now free and can be downloaded by anyone to use/modify however they wish.

We want to thank all our users for their support over the years. All the best in 2020 and beyond.

Change text for "Related Products" to something different in single product page / Woocommerce

heathheath Lifetime Member
I'm trying to change the wording for the h2 header "Related Products" at the bottom of individual products to read "Related Stories". How do I go about doing this? Thx.
Heath Rost
Personable Media
heath@personablemedia.com

Comments

  • Options
    Mark_HodderMark_Hodder Administrator, Lifetime Member
    That is coming from WooCommerce, there is probably a few ways to change it but this function seems to handle it if you add it to your custom_functions.php file.
    /**
     * Change text strings
     *
     * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
     */
     function my_custom_text_strings( $translated_text, $text, $domain ) {
        switch ( $translated_text ) {
            case 'Related products' :
                $translated_text = __( 'NEW TEXT GOES HERE', 'woocommerce' );
                break;
        }
        return $translated_text;
    }
    add_filter( 'gettext', 'my_custom_text_strings', 20, 3 );
    Need Additional Help?
    - Check out the Resource Center for helpful tutorials and hints.


    image
  • Options
    heathheath Lifetime Member
    Worked, thanks!
    Heath Rost
    Personable Media
    heath@personablemedia.com
This discussion has been closed.