[wp-hackers] The strangest thing

Austin Matzko if.website at gmail.com
Mon Jan 21 16:29:26 GMT 2008


On Jan 21, 2008 11:22 AM, Mário Gamito <gamito at gmail.com> wrote:
> I'm developing a plugin and the most weird thing happens.
>
> Why does this code:
> $sapo_url='http://tags.sapo.pt/post?v=3&url=' . the_permalink();
>
> displays: http://www.absinto.org/?p=38http://tags.sapo.pt/post?v=3&url=
>
> Instead of:
> http://tags.sapo.pt/post?v=3&url=http://www.absinto.org/?p=38


Because "the_permalink" echoes instead of returning the permalink.
You want "get_permalink" instead.


More information about the wp-hackers mailing list