I am following this tutorial — "Display Your Popular Posts In WordPress Without A Plugin" and want to limit the max number of characters in the title that are displayed. Also, why is the thumbnail, at times, smaller than the number I define in the php?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
first add this function to your functions.php file
then before the loop of the code you linked add this line to hook the above function:
and after the loop remove this filter:
and just change |
|||
|
text-overflowCSS property. (2) You said you've defined the thumbnail size in php. If so, did you enable "hard cropping"? Unless you do that, dimensions of the thumbnails generated aren't going to be exact. – its_me Jun 27 '12 at 1:58