Using woocommerce_shop_loop_item_title to customize the product title

This topic has 5 replies, 2 voices, and was last updated 3 years, 8 months ago ago by Olga Barlow

  • Avatar: Adrian
    Adrian
    Participant
    July 10, 2020 at 16:28

    Hello,

    I’m trying to use a custom function to add something before the product title on the shop page. When using woocommerce_shop_loop_item_title nothing happens. Any other hook on the shop seems to work, but this one doesn’t.

    Can you help? Thanks!

    4 Answers
    Avatar: Adrian
    Adrian
    Participant
    July 10, 2020 at 16:52

    In the end i copied the content-product.php to my child theme woocommerce folder and added the custom info there. It works, but i was just wondering if this is a good practice. Could it cause issues ? Thanks.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    July 10, 2020 at 17:13

    Hello,

    Try et_before_shop_loop_title.

    Regards

    Avatar: Adrian
    Adrian
    Participant
    July 12, 2020 at 08:27

    That didn’t work well for me. So i copied the content-product.php to my child theme woocommerce folder and added the custom info there.
    Is this a good practice? Could in cause any issues in the future?

    Thanks.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    July 13, 2020 at 11:05

    Hello,

    Yes, it’s ok. You can use that in child theme. Just keep it up to date in case file version changes.

    Regards

  • Viewing 5 results - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.