![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Greetings,
Following another thread here I was found the Limit Title plugin. I would like to go ahead and add the following code to the functions.php instead of using the widget but I'm not sure where and how to get the length I want. What I am trying to fix is a format problem on my homepage. I managed to get the first category area uniform in length but am having problems with words wrapping below the thumbnails on posts with longer titles. If you look here: wander-argentina.com you'll see that the first restaurant, Granix has five lines of teaser text with words going below the photo, while the others have four lines. I would like every entry to have fours teaser lines so that it looks neater. Can anyone tell me what the >$length) value should be and where do I insert this code? Thanks very much! $string = the_title('','',FALSE); if(strlen($string) > $length) $string = (preg_match('/^(.*)\W.*$/', substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer; echo $string; } |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WP 2.8 Fatal Error with LIMIT POSTS plugin | cbryant | General Discussion | 1 | 08-06-2009 11:43 PM |
| Limit title length | the chimp | General Discussion | 2 | 01-14-2009 02:18 PM |
| Limit Post plugin in Function.php? | CCobb | General Discussion | 13 | 11-26-2008 11:53 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us