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
‘Portal’ And ‘Left 4 Dead 2’ Arrive On Linux
Steam is powerful, hot, and painful. It can move trains, boats, and has driven minds crazy with the power of...
Content Marketing: 5 Tools to Help Drive Your Instant Results
The ability to make gather the information and properly arrange the content based on the supportive skills. Because of, all...
Why Having Your Site Built In WordPress Is Essential For SEO
WordPress is a highly popular open source content management system that is not only best for blogging, but also for...
What to Consider When Choosing a WordPress Theme for Your Business
If you’ve started looking for themes for your business site, you will understand that there are literally hundreds of thousands...
powered by WassUp
Recent Posts: Fully Net Worth . com
Ryan Garcia is an American professional boxer who competes in the lightweight division. Most recently, he became the winner of the WBO–NABO and WBC Silver lightweight title. He recently signed a deal with Golden Boy Promotions, which is said to be one of the most lucrative boxing deals for a prospect. As of 2019, Ryan […]
Quin NFN is an emerging American rapper who has released songs such as “Talkin’ My Shit” and “Gametime Pt. 2”. He was born on January 18, 2001, in Austin, Texas, United States. As of 2019, Quin NFN net worth is estimated to be $200,000. Though Austin has been the home of some big stars in […]
Kembe X is an American rapper who is best known for his songs such as “Dollar Please”, “Extremely Good”, and “Schemin On The Scoochies”. As of 2019, Kembe X net worth is estimated to be $200,000. Kembe X initially found some success through his debut mixtape called Self Rule but had a dip in the […]