URL problem in Single.php when retrieve data from Custom Field
-
Hi
I am trying to update Single.php page and retrieve data from Custom Field variable. My target is to retrieve a URL link from custom field and create a link through URL Link. For retrieving custom field data and crate a Link I’ve write this code in Single.php file$str = get_post_meta($id, "website", true); echo ""?> <a href="<;?php echo $str; ?>" target="blank">Example.com</a>For Example, if the the custom field data retrieve http://www.example.com, here in my code the link shows my local servers link (I am testing on my local server) http://localhost/mysite/2011/09/07/test1/www.example.com
So, here actually the Example.com is tagged with a wrong URL where I want it to only show http://www.example.com
How to solve this URL Problem? 🙁
The topic ‘URL problem in Single.php when retrieve data from Custom Field’ is closed to new replies.