This little trick can be useful for calling custom functions and printing the title with out spaces for W3C compatibility. I used this trick in a new theme called Galleria, which will be out for public download in the coming days.
Using this comes in handy for a delicious text link:
<?php $title = get_the_title(); ?> <a href="http://del.icio.us/post?url=<?php echo $title; ?>&<?php echo str_replace(" ", "%20", $title); ?>"> Bookmark This (<?php echo $title; ?>)</a>
What I am doing is calling
$title = get_the_title(); and using
str_replace(" ", "%20", $title); to replace empty spaces with a
%20, which is used in URL encoding empty spaces.
Alternatively you can use a dash or underscore.
Thanks to Jason Boyle for his adaption.
Random Search Terms
The New Theme
So I want to hear some feedback! Please let me know what you think so far. The theme is based...
Flip! A jQuery plugin
I just came across a interesting new plugin built on the wonderful jQuery library. It’s called Flip!, head on over...
powered by WassUp
Recent Posts: Fully Net Worth . com
Charles Rogers was an American NFL player who played as a wide receiver for three seasons in the National Football League. Rogers played three seasons with Detroit Lions. Charles Rogers net worth before his death is estimated to be $200,000. Rogers was born on May 23, 1981, in Saginaw, Michigan. He went to Saginaw High […]
Cynthia Frelund is Data Analyst Expert for the NFL Media Network where she focuses on breaking down all the numbers on the show Numbers Game. Moreover, from the perspective of the fans, she is a key influencer in their fantasy football predictions. As of 2019, Cynthia Frelund net worth is estimated to be $1 million. […]
Emma Louise Barton is an English actress who is best known for playing the role of the character named Honey Mitchell in EastEnders. She is currently part of the seventeenth edition of the popular dance show called Strictly Come Dancing. As of 2019, Emma Barton net worth is estimated to be $2 million. Barton was […]