• Resolved vectyr

    (@vectyr)


    My custom field is appearing like a champ, but I’d like this custom link to appear along with the custom field.

    How would I go about combining this:

    <?php $mymeta = get_post_meta($post->ID, 'h1-summary', true);
    if ($mymeta) {
    echo '<div class="summary"><h2>Hour 1</h2>'.$mymeta.'</div>';
    } ?>

    And this:

    <a href="https://www.website.com/sites/website.com/files/
    <?php echo $post->post_name; ?>
    a.mp3">Test</a>

    I’d like the link to actually display below the <h2> if possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php $mymeta = get_post_meta($post->ID, 'h1-summary', true);
    if ($mymeta) :?>
    <div class="summary"><h2>Hour 1</h2><?php echo $mymeta;?></div>;
    <a href="https://www.website.com/sites/website.com/files/<?php echo $post->post_name; ?>a.mp3">Test</a>
    <?php endif; ?>
    Thread Starter vectyr

    (@vectyr)

    Hey Esmi, what’s happening? You’ve helped me out about a billion times – you are the total bomb!!! You had the solution in like three minutes! YOU ARE THE BEST!!!

    Glad I could help ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Anyone got the skills to merge this code?’ is closed to new replies.