Forums

[resolved] How to call an image with php (3 posts)

  1. jmscottimd25
    Member
    Posted 3 months ago #

    i have this piece of code and i'm trying to call the image associated with it. however i can not get to bring the image up.
    can someone point me in the right direction or tell me what i am doing wrong?

    here is my url http://307element.net/folio/ click on either of the images to see the problem any help would be appreciated.

    <?php 
    
    if (get_post_meta($post->ID, 'post-image', true) != null) {
    
    print '<a href="<?php echo $image = post-image; ?>';
    print '" rel="lightbox"';
    print '"><img src="';
    $key="post-image";
    echo get_post_meta($post->ID, $key, true);
    print '" alt="" /></a>';
    
    } else {
    
    }
    ?>
  2. MichaelH
    Moderator
    Posted 3 months ago #

  3. jmscottimd25
    Member
    Posted 3 months ago #

    thanks that link wasn't what i was looking for but i figured it out.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.