WordPress.org

Ready to get started?Download WordPress

Forums

Need to make links clickable (3 posts)

  1. naweedshams
    Member
    Posted 4 years ago #

    Hi,

    I had a dodgy web developer insert bizarre code into my theme so I'm trying resolve it without any success.

    http://www.visitlocal.co.uk/index.php/2009/12/08/get-bike/

    If you look over to the left side, Contact Details, the email and web address should be clickable links not plain text.

    This is the code in the single post file;

    <h3>Contact Details:</h3>
                            <p><strong>Tel:</strong> <?php echo get_post_meta($post->ID, "tel_value", true); ?></p>
                            <?php if (get_post_meta($post->ID, "email_value", true) != ""){ ?>
                            <p><strong>Email:</strong> <?php echo get_post_meta($post->ID, "email_value", true); ?></p>
                            <?php } ?>
                            <?php if (get_post_meta($post->ID, "website_value", true) != ""){ ?>
                            <p><strong>Website:</strong> <?php echo get_post_meta($post->ID, "website_value", true); ?></p>
                            <?php } ?>

    Hope anyone can be of any help.

    Thanks,

    Naweed

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    try to change it to:

    <h3>Contact Details:</h3>
                            <p><strong>Tel:</strong> <?php echo get_post_meta($post->ID, "tel_value", true); ?></p>
                            <?php if (get_post_meta($post->ID, "email_value", true) != ""){ ?>
                            <p><strong>Email:</strong><a href="mailto:<?php echo get_post_meta($post->ID, "email_value", true); ?>"><?php echo get_post_meta($post->ID, "email_value", true); ?></a></p>
                            <?php } ?>
                            <?php if (get_post_meta($post->ID, "website_value", true) != ""){ ?>
                            <p><strong>Website:</strong><a href="<?php echo get_post_meta($post->ID, "website_value", true); ?>"> <?php echo get_post_meta($post->ID, "website_value", true); ?></a></p>
                            <?php } ?>
  3. naweedshams
    Member
    Posted 4 years ago #

    Fantastic! :D

    Now you my friend, should be my web developer instead!

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic