• Resolved paa1605

    (@paa1605)


    Hi guys,

    I have a page with a custom field named ‘whats_new_banner’. The value is the upload address of the image. How do i make this image a link? I want the link to be a custom field as well. For example;
    name: whats_new_link
    value: example.com/new

    My current code is as follows:

    <div id="home-panel">
    
    <?php $image = get_post_meta($post->ID, 'whats_new_banner', true);
    if($image) : ?>
    <img src="<?php echo $image; ?>" alt="" border="0" />
    <?php endif; ?>   
    
    </div>

    [Please post code snippets between backticks or use the code button.]

    Any help would be much appreciated. Thanks.

    Patrick.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How do i make a custom field image a link?’ is closed to new replies.