I’ve got a piece of wordpress code that outputs a string (which is a url)
I need to convert this output to a link.
echo get_post_meta($post->ID, "Link", true);
The code is already inside tags as there are other php calls in the file too.
How do I modify the code to output a link?
Thanks
something like this?
or
Because PHP can echo literal HTML code, you can simply output the link inside a hyperlink.
Alternatively, you can choose to close and reopen the PHP tag before and after the echo statement. The above is the same as…
The second method is handy when you have large blocks of output and you don’t want to make individual echo statements all over the place.