I'm just another biginner on PHP and wordpress. Well, I've used another code to get meta data and use it as a link in my blog. Everything is fine, but the link is incorrect, wordpress add the website URL and my meta_data URL.
I'm using the code posted here: adding a URL to a post meta
<?php
if ( get_post_meta( $post->ID, "Link", true ) ){
echo '<div class="pros"><p><strong>Movie Website: </strong><a href="' .
get_post_meta( $post->ID, "Link", true ) .
'" target="_blank">' .
get_post_meta( $post->ID, "Link", true ) .
'</a></p></div>';
}
?>
For exemplo: I've got "www.stackexchange" from my post. When I use this funcion to put this data into my blog, it came as "localhost/mysite/www.stackexchange"
Is anybody can help me?