Forum Replies Created

Viewing 1 replies (of 1 total)
  • AlexKr

    (@alexkr)

    I’ve got the same problem over here and wasn’t able to fix it with css.

    So i’ve gotten into content-product.php (in woocommerce/templates)

    and did the following to output the product title:

    <h3><?php
                 if(strlen(get_the_title()) < 17) { echo "<br>"; echo get_the_title(); }
                 else echo get_the_title();
         ?></h3>

    So this solves it a little bit by just adding a new line if the title is to short and thus putting all the add to cart buttons on same line.

    I know it breaks when the page gets bigger or smaller. Do you have any suggestions on how to improve this?

    Maybe i don’t see a good way because this is my first encounter with php

Viewing 1 replies (of 1 total)