Reputation: 95
This works fine and returns the item permalink
$item->get_permalink()
But if I want to return the whole url the code below will return the feed url instead of the item permalink.
What is wrong with this code below? Why it doesn't return the whole href?
$link ='<a href=".$item->get_permalink()."></a>';
Thanks
Upvotes: 0
Views: 66
Reputation: 2205
$link ="<a href=\"$item->get_permalink()\"></a>";
or
$link ='<a href="'.$item->get_permalink().'"></a>';
instead of
$link ='<a href=".$item->get_permalink()."></a>';
Upvotes: 0