I’ve been banging my head all night about this… I’m very new to php so please be gentle… (the file names below refer to common wordpress “theme” files, fyi):
I’m trying to write a function that I can call on various pages to simply auto-generate a hyperlink (essentially for stumbleupon and such). (I’ve looked at the plug-ins and decided they don’t really fit what I’d eventually like to do). Here is the function, located in functions.php:
function joshtags($perm,$title){
echo “<a href=“http://www.stumbleupon.com/submit?url={$perm}&title={$title}”><img src=“icon_su.gif”> Stumble it!</a>”;
}
and here is the function being called in single.php:
<?php joshtags(the_permalink(),the_title()); ?>
As you can see here (under the post title):
http://www.quantummirage.com/blog/?p=32
Everything gets echo’d out but the order is wrong and only partial hyperlinked. I’m goin nuts!
Thanks in advance for the help!