Ever wanted to display the title of a post somewhere but limit the amount of characters that are shown? For instance, this post has a very long title, and if I were to use
<?php echo the_title() ?> it would show as follows: Limit the characters that display on the_title.
That may not fit well on one line in lets say a widget or small width
div. So here is a neat trick you can use:
<?php $title = the_title('','',FALSE); echo substr($title, 0, 11); ?>
Pretty simple huh, just note the bold numbers, in this case 11 character would output like this: Limit the c.
Thanks to Tattershall Way for this snippet.
Random Search Terms
WordPress 2.6.5 is immediately available and fixes one security problem and three bugs. We recommend everyone upgrade to this release....
Another plugin I am using on this site: Comment Validation by Jörn Zaefferer. From Jörn’s site: Why should you install...
Woopra is the world’s most comprehensive, information rich, easy to use, real-time Web tracking and analysis application. Features include: Live...
WordPress Beta 3 Error
If you don’t know, this site is running the latest WordPress. Which is in Beta testing, version 2.7 Beta-3. I...
powered by WassUp
Recent Posts: Fully Net Worth . com
City Girls is an American hip hop duo originally from Miami which consists of the rappers Caresha Romeka Brownlee (known as Yung Miami) and Jatavia Shakara Johnson (known as JT). Here are some facts about City Girls including their net worth, career and many more. 1. City Girls has an estimated net worth of $500,000 […]
Tasha K is an American social media personality and pop culture aficionado. She is best known for her YouTube channel ‘unWinewithTashaK’. Tasha K net worth is under review and is not available at the moment. Tasha whose real name is Latasha Transrina Kebe was born on March 10, 1982, in Panama City, Florida but later […]
Roman Kemp is an English radio host and presenter. He presents for the national radio network Capital FM and is part of the nineteenth series of I’m a Celebrity…Get Me Out of Here!. As of 2019, Roman Kemp net worth is estimated to be £2 million. Kemp was born on 28 January 1993, in Los […]