Let's say my product title is:
Brown Colored Leather Shoes
But based on my column width the title looks like this:
Brown Colored Leather
Shoes
I know it's possible to do a character replacement so that a "|"
in the backend becomes a line break <br/>
. But I don't know how.
I want it to look like this
Brown Colored
Leather Shoes
I found these references:
Adding a break to product title on shop pages for a certain length
https://medium.com/@clarklab/add-a-line-break-in-a-wordpress-title-b3aeff346037
Is it possible to add a line break to WC products long titles?
'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in /home/...../functions.php on line 450 – coes Sep 25 '17 at 20:01
', $title ); // we replace '|' by '
': return $title; }` Thank you thank you!! When I copied your code it created an OBJ character. Here https://imgur.com/8expPVQ – coes Sep 25 '17 at 20:04