[Resolved] Is there a way to limit the length of text on the shop pages for products?

Home Forums Support [Resolved] Is there a way to limit the length of text on the shop pages for products?

Home Forums Support Is there a way to limit the length of text on the shop pages for products?

  • This topic has 4 replies, 2 voices, and was last updated 3 years ago by chris.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1349719
    chris

    I currently have some long product names & i’m looking to truncate the text so it stays on two lines, is there an easy way do doing this?

    thanks in advance

    #1349755
    David
    Staff
    Customer Support

    Hi there,

    you can try some CSS to force all titles to a maximum of 2 lines:

    .woocommerce ul.products li.product .woocommerce-LoopProduct-link h2 {
        line-height: 2.5ex;
        height: 5ex;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #1371306
    chris

    hey thanks for this, it was really helpful

    #1371757
    David
    Staff
    Customer Support

    Glad to hear that

    #1677039
    chris

    closing

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.