Text Space for Shop Products Title names

Hello dear Support,

check my picture i need a solution for the text space maybe u can help me with some nice code snippets thx.

Hey there,

I hope you are well today and thank you for your question.

Can you kindly share the URL for you website, so we can investigate the issue?

Best regards,
Support.

thank you sir for your help but the main problem is:

there is no issue the point is when the product article got to much text he make a second line and drop down the buttons there must be code to filter the space of the letters like 20 space and than comes “…”

any idea?

thats the class in tyche theme/ woocomerce but where i can find it

class=“woocommerce-LoopProduct-link woocommerce-loop-product__link”>

this class need a special string to tell them only 20 space for the title and “…” this comes after 21 as example anyone got an idea how i can do that?

i solved the problem if someone need the coode pm back

Hello there,

Nice work, solving the issue. You can post the solution here for the other users to see.
Please feel free to contact us again in the future regarding any other issues.

Best Regards,
Support

/*
// add_filter(‘show_admin_bar’, ‘__return_false’);

// Note: this is simple PHP that can be placed in your functions.php file

// Note: substr may give you problems, please check Option 3

add_filter( ‘the_title’, ‘shorten_woo_product_title’, 10, 2 );

function shorten_woo_product_title( $title, $id ) {

if ( is_shop() && get_post_type( $id ) === ‘product’ ) {

return substr( $title, 0, 24 ). …; // change last number to the number of characters you want

} else {

return $title;

}

}

this solution works only for the shop page i dont figure out how i solve this in the front page widget and subcategorys if someone can help it would be awesome the code u need to add function.php

greetz angelz have fun with that snippet