WordPress.org

Ready to get started?Download WordPress

Forums

Help Custom Fields display a unique image per page (1 post)

  1. tbresch
    Member
    Posted 6 years ago #

    I am a noob. I know very little about PHP.

    I want to display a unique picture per page using custom fields.

    I've modified the FallSeason 1.0 template intending to display a unique picture for each page in the sidebar div. I have the image I want to use in the theme's image folder.

    With success, I've used <?php the_meta(); ?> to display the meta data for my image. Very Cool.

    I've picked another piece of code from another discussion and am only able to display an image place-holder. Here's the code...

    <div id="sidebar">
    <img src="http://www.breschcraft.com/gorges/wp-content/themes/fallseason-10/images
    <?php $values = get_post_custom_values("sidebar_page_img"); echo $values[0]; ?>.jpg">
    </div>

    I'm closer than ever, but I need your help!
    Will you accept this challenge?

    Thanks very much.

Topic Closed

This topic has been closed to new replies.

About this Topic