WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. jmscottimd25
    Member
    Posted 4 years 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
    Member
    Posted 4 years ago #

  3. jmscottimd25
    Member
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.