Hi, is it possible to put embedded links as custom field values?
I only get echoed with "Array", since the custom field value reminds about an array, sort of. I need a workaround to get this to work. Anyone who can help me with any hint?
If custom field is present, formulate and display link from meta value
<?php
$link = get_post_meta($post->ID, 'link_url', true);
$text = get_post_meta($post->ID, 'link_text', true);
if ($link){
echo 'Credit: <a href="'.$link .'">'.$text.'</a>';
}
?>MichaelH: Thanks! You probably saved my night! :-)
This topic has been closed to new replies.