I would like to use php in a wordpress post. I have installed a plugin that allows php to be used in these tags: [php][/php]
I am trying to create this link:
<a href="http://www.facebook.com/sharer.php?u=http://myurl.co.uk/?affid=[php]global $current_user; get_currentuserinfo(); echo $current_user->user_login;[/php]" title="Share on Facebook" target="_blank"></a>
This code doesnt work, but when I simply post the php on its own like so:
[php] global $current_user; get_currentuserinfo(); echo $current_user->user_login;[/php]
it works.