Support » Plugin: WooCommerce » Change “Product description” to “Product title” + ADD WORD

  • Resolved rptr

    (@rptr)


    Hello guys,

    I am changed “Product description” to “Product title” with this code at functions.php file:

    add_filter( 'woocommerce_product_description_heading', 'paulc_product_title' );
    function paulc_product_title() {
    	return get_the_title();
    }

    Now I want to add one word before “Product title” – for example product title is TOYOTA COROLLA and I want to add word CAR before TOYOTA COROLLA at product description. Any ideas how I can do it?

    Peter

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support AJ a11n

    (@amandasjackson)

    Hi @rptr

    You can do this by using a free translation plugin like [Loco Translate](https://wordpress.org/plugins/loco-translate/).  I know it may sound strange to “translate” your own language, but it works. This will allow you to find that phrase and change it to be what you’d like.

    Thread Starter rptr

    (@rptr)

    Hi Amanda, I dont want change any phrase. I just want to add phrase before title at description. There must be simple way how to do it 🙂

    • This reply was modified 1 year, 3 months ago by rptr.

    Hi

    Try this one:

    add_filter( 'woocommerce_product_description_heading', 'paulc_product_title' );
    function paulc_product_title() {
    	return 'Car ' . get_the_title();
    }

    Good luck

    Thread Starter rptr

    (@rptr)

    Hi, it works. Thank you, friend! 🙂

    Plugin Support Joey – a11n

    (@jricketts4)

    Thanks for letting us know, @rptr!
    I’ll go ahead and mark this as Resolved.

    – Joey

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change “Product description” to “Product title” + ADD WORD’ is closed to new replies.