Support » Fixing WordPress » get_the_permalink not working?
7 years, 6 months ago
I need to output the permalink to a variable, and I would think this could be done like so:
$output .= get_the_permalink();
But it doesn’t seem to work. I can’t find any help in the Codex, which doesn’t even mention get_the_permalink. Is it even a wordpress function? Any suggestions?
Need to use get_permalink() with the id of the post:
$permalink = get_permalink($post->ID);
Thank you 🙂
7 years, 5 months ago
Thanks from me too 😀
7 years, 3 months ago