April 30, 2014 at 10:58 pm 19733
|Erik||Hello Wedevs Team, I have a question and a suggestion. How to set a character limit to product title? I mean, to avoid from looking like example below: http://imgur.com/YGyWwbV.png Can we only show a single line title no matter how long it is, anything beyond the product thumbnail will not be shown. But if we hover on it, there's a marquee effect or something that reveal the full title. I don't know how many of us really need this 'issue' to be fixed, but I really need it badly. Because I can't stand to look at inconsistent product thumbnail height. You know, just to keep my site clean, sleek and consistent. Thanks in advance guys! :)|
May 4, 2014 at 11:41 am 19851
sorry for late reply.
2. now open the file
3. replace line
in this line
Thank you. 😀
May 5, 2014 at 1:47 pm 19900
You can also achieve this with CSS,
May 5, 2014 at 11:56 pm 19937
Thanks a lot Shaikat & Paul!
I’ve tried both of your codes and it works! Awesome! 🙂
May 6, 2014 at 1:22 pm 19961
I’d recommend the CSS fix, you won’t have to keep updating the .php file every theme update 🙂
May 25, 2014 at 11:52 am 20996
Thank you Paul. 🙂
June 10, 2014 at 2:32 pm 21697
I know this is an older thread but I am trying to achieve the same thing – but cant get the code to work.
Is it just a case of adding the code to style.css?
I tried that but it had no effect on how the text on the product thumbnail is displayed.
Any suggestions are appreciated 🙂
June 10, 2014 at 3:04 pm 21699
This shouldn’t affect the thumbnail, but the product text itself. If you supply a URL to your site I’ll take a quick look.
June 10, 2014 at 3:47 pm 21703
Thanks. Here is a screen shot.
Based on the original post I thought the code would keep the text on one line then make a (…) to show there is additional text
Am I misunderstanding?
June 10, 2014 at 3:52 pm 21706
Thanks, yes that’s exactly how it should work. Where are you adding the CSS? In a child theme?
If you supply a URL it would be easier to identify the issue, and check why the CSS isn’t working.
June 10, 2014 at 4:38 pm 21715
The code was added to style.css. Is this the correct place to add it?
The site is in maintenance mode so purchases are not made, but will enable it for a couple of hours
Please Scroll to the bottom to see the problem
June 10, 2014 at 4:48 pm 21716
I’ve had a look but none of the titles seem to reach the end of the available space, so nothing was happening. But I edited a product title in Chrome & it’s working fine:
June 10, 2014 at 5:17 pm 21717
Seems to work on the frontpage, but not if you click on all the products
Paul as a matter of interest, how were you able to edit a title? I would have thought the security would prevent that
Thanks for your advice on this 🙂
June 10, 2014 at 5:29 pm 21718
AH of course, this only works on the home page due to the
If you replace that css with the following:
You should get your desired result. I’ve not fully tested this so give it a go and see how it looks.
June 10, 2014 at 5:34 pm 21719
Also I didn’t rename anything on your site, but using “Inspect” in Google Chrome to edit the code.
June 10, 2014 at 5:40 pm 21720
Paul you a genius, thank you so much for the help. 🙂
In the scrteen shot it looks like you made a change to the first product.
May I ask how that change was made without being a registered user plase Paul?
I just want to make sure I have not overlooked some editing security setting or something!
Thanks again for your help