Support » Fixing WordPress » Inserting URL's in Custom Field Values

  • Resolved davidzupec


    Hello, below is a static url code that’s on my page as an example. What I want to do is make it dynamic so that I can input any website address as a value in my custom field and it’ll show up as a clickable link on my page. Not sure how to echo this out:

    <p><a href=""></a></p> 
    My custom field Name is <strong>client</strong> and the Value I put is <strong></strong>
    I tried this:
    <p><?php echo get_post_meta($post->ID, 'client', true); ?></p>

    and it returned this: (nothing clickable)

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi


    Forum Moderator

    <p><a href="<?php echo get_post_meta($post->ID, 'client', true); ?>"><?php echo get_post_meta($post->ID, 'client', true); ?></a></p>

    It Works!!! Thank you so much esmi, I’ve been tackling this all morning : )


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Inserting URL's in Custom Field Values’ is closed to new replies.