[Resolved] Woocommerce title length – product archive/related products

Home Forums Support [Resolved] Woocommerce title length – product archive/related products

Home Forums Support Woocommerce title length – product archive/related products

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #621847
    Jarno

    I use Woo title limit to limit the titles to a certain number of characters. However this doesn’t work as I need it.
    Most things I try regards a certain amount of characthers. However I would just set it to one row, not langer than one row and with … to where the cut off happens.

    This should also be done for the related products and product widgets.

    I can’t get it to work with:

    // Note: this is simple CSS that can be placed in your custom.css file
    // This CSS also adds 3 dots ... at the end of each product title
     .woocommerce ul.products li.product h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    }
    GeneratePress 2.1.3
    #621860
    David
    Staff
    Customer Support

    Hi there,

    WOO uses multiple selectors for its titles – so try this instead:

    .woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product h3 {
    	overflow: hidden;
    	text-overflow: ellipsis;
    	white-space: nowrap;
    }
    #621862
    Jarno

    Yep worked like a charm.

    Thanks!

    #621868
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.