• Resolved ThorHammer

    (@thorhammer)


    Hi, is it possible to put embedded links as custom field values?

    like: Link 1, Link 2

    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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>';
    }
    ?>

    Thread Starter ThorHammer

    (@thorhammer)

    MichaelH: Thanks! You probably saved my night! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Embedded links in custom field’ is closed to new replies.