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

  • Resolved davidzupec

    (@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:

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

    and it returned this: http://www.ultrashine.com (nothing clickable)

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • <p><a href="<?php echo get_post_meta($post->ID, 'client', true); ?>"><?php echo get_post_meta($post->ID, 'client', true); ?></a></p>

    Thread Starter davidzupec

    (@davidzupec)

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

    David

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