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 design in progress
Okay, so by now you may notice something. You may be thinking “the site looks a lot different”, and you...
Bar Camp Los Angles 7
Hello from BarCampLA in beautiful Culver City. It's a bit early and presentation's don't start till after lunch. While I...
New theme release: CULT[i]VATE
Doing theme modification and even custom template files has brought me to this point. Today I've created my first premium...
WordPress design tweak results are in
Did you vote? I did. Did your vote win? Mine didn’t 🙁 Results. Advertisements
powered by WassUp
Recent Posts: Fully Net Worth . com
LaTisha Scott is a Commercial Real Estate Developer who is the CEO of Infinity Properties. She is best known for starring in the reality television series called Love & Marriage: Huntsville. As of 2019, LaTisha Scott net worth is estimated to be $8 million. She was born on October 1, 1981, in the United States. […]
Myles Stephenson is a singer who is best known for winning the popular competition called The X Factor with the boyband Rak-Su back in 2017 in its 14th edition. He is now part of the awaited reality show called I’m a Celebrity…Get Me Out of Here!. As of 2019, Myles Stephenson net worth is estimated […]
Nadine Coyle is an Irish singer, actress, and model. She is part of the girl group called Girls Aloud which has been named the United Kingdom’s biggest-selling girl group of the 21st century. As of 2019, Nadine Coyle net worth is estimated to be $13 million. Coyle was born on 15 June 1985, in Derry, […]