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
How to: Add a contact me via Skype™ button
This little trick is really simple and easy. All you need to do is plug this line of code anywhere...
This powerful plugin is a must-have for WordPress users. With WP-DBManager you can manage your WordPress database and allows you...
Hello, welcome to a new WordPress community site. Join the ever growing and oh so popular WP Cult. Here we...
Top Membership plugins
Membership plugins/scripts for WordPress paid and free we will review them here today. Ultimate Membership Pro Ultimate Membership Pro is...
powered by WassUp
Recent Posts: Fully Net Worth . com
Michael T. Sterling is a professional lawyer who is best known to the public as the husband of actress, model, and television personality Eva Marcille. She has risen to popularity after winning season three of America’s Next Top Model. Here are five interesting facts about Michael Sterling including his personal life, net worth, wife, and […]
Lil Uzi Vert Net Worth: Know Everything About Him. If you are into hardcore rapping, then you must have heard about Lil Uzi Vert. He is an American rapper and songwriter who rose to fame after his hit single ‘Bad and Boujee’ that ranked number 1 on the US Billboard Hot 100. Lil Uzi was […]
Russell Brunson net worth Introduction Russell is an autonomous businessman, a digital market pioneer, an author, mentor, and motivational speaker. Throughout his several years of career in numerous internet marketing services, he has earned a chance and has influenced millions. He has created the idea of selling in a software project named ClickFunnels through a […]