Solved – How to Shorten WooCommerce product titles – Limit Woocommerce product title

A very common issue: sometimes (mostly with affiliates online stores), WooCommerce product titles are way too long. On top of this, you may also want to keep the shop experience consistent, and make all the WooCommerce product titles of the same length. This is how you do it.

+ Option 1: (CSS): Limit all WooCommerce product titles to one line only

+ Option 2: (PHP): Limit all WooCommerce product titles to max number of words

+ Option 3: (PHP): Limit all WooCommerce product titles to max number of characters

18 Comments

  • omer

    After long time spending to find the solution to reduce the tile of my product finally i found in your youtube video thank you soo much.

  • Raphael

    Hi, how can I set the “…” after the option 3?

  • Nasir

    nice working fine

  • Michelle

    your recommended css didn’t change anything for us. instead we figured this out, it works on desktop and mobile:

    h3.product-title{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;}

    • Melissa Muller

      Hey Michelle

      I’m using wordpress and the7 theme, and still nothing. I’ve used probably about 10 solutions now, and absolutely nothing is working. Any advice?

  • S M Hussain

    Superb Bro, Thank you very much.

  • Ukdigit

    Thank you … opt 2 Works perfect!

  • ib

    hi pls i need help. the css isnt working for my site

    • Michelle

      im using wordpress and we figured this one out:

      h3.product-title{
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;}

  • sheik

    in mobile view it is not working

  • Sagar Khurana

    This really worked in PHP. Thanks a lot

  • ygor

    any way to insert 3 points after the titles?

  • 9nines

    Bravo.
    Been looking for this for quite sometime.
    Thanks a lot.

  • Reynaldo

    In same way i try to figure out the max page title with option 2, but no hope hahahaha. Btw nice function man1

  • Shahadul Islam

    In Php character limit if i want to add ….. after 20 words???? What is to be added???

  • Jox

    Works perfect! Thanks a lot.

  • Admin

    In Option 1, your website’s “class name” may be different. If you need help, let me know here

    • Melissa Muller

      Please help me. I’m working on the7 theme and absolutely NONE of the at least 15 fixes I’ve tried has work

Leave a Reply

Your email address will not be published. Required fields are makes.