scottbrown
Member
Posted 1 year ago #
Hi there,
I have added some social bookmarking links to my site in the single post (single.php) file - they won't open in the correct format, it adds my site address at the start of the link.
the link in the single.php is -
http://twitter.com/home/?status=<?php echo urlencode(the_title(”,”, false)) ?>:<?php the_permalink() ?>
when clicked opens as -
http://test.scottbrown.co.nz/"http://twitter.com/home/?status=”New+Test”:http://test.scottbrown.co.nz/?p=34"
any ideas?
What code did you use to add these links?
scottbrown
Member
Posted 1 year ago #
complete code for this link is as follows:
<a href=”http://twitter.com/home/?status=<?php echo urlencode(the_title(”,”, false)) ?>:<?php the_permalink() ?>” target=”_blank”><img src="images/twitter.png" width="19" height="19" border="0" alt="" /></a>
You need to replace your 'curly quotes' with just normal quotation marks.
<a href="http://twitter.com/home/?status=<?php echo urlencode(the_title(",", false)) ?>:<?php the_permalink() ?>" target="_blank"><img src="images/twitter.png" width="19" height="19" border="0" alt="" /></a>
Should work.
scottbrown
Member
Posted 1 year ago #
Thanks Spencer, I knew it would be something simple... been staring at the page for too long :)