Custom field url not working
-
I’m trying to make a homepagebox image link to a page but its not working.
In home.php, i have defined a custom field:
< ?php $homepagebox_link = get_post_meta($post->ID, "homepagebox_link", $single = true); ?>
and then shown the custom field in the link:
<a href="< ?php echo $homepagebox_link ?>"><img src="<?php echo $thumbnail[0]; ?>" height="150" width="280" title="<?php the_title(); ?>" /></a>
In the page, i have added a custom field:
Name: homepagebox_link
Value: https://www.costacomputer.com/services/When i click the image link, it displays
www.costacomputer.com/<?php%20echo%20homepagebox_link%20?>
in the link rather than the url i have set.Hope thats all clear, can anyone help me or point me in the right direction. The site is https://www.costacomputer.com
- The topic ‘Custom field url not working’ is closed to new replies.