treehouse : what would you like to learn today?
Web Design Web Development iOS Development

custome fields get_post_meta question

  • I am creating a post template in my wordpress.

    I need to have:
    1/ a dynamic src inside an image - so I can place "artist-image" as custom field and the path. This works.
    2/ I need to a link underneath that contains a website link
    3/ pretty much the same as number 2

    Here's my PHP - 2 and 3 aren't working - but number 1 is. What am I doing wrong? Any ideas?

    <!-- I NEED TO POST AN IMAGE FROM THE IMG and THEN TWO SEPERATE LINKS BELOW - 1/ WEBSITE 2/ MYSPACE URL -->

    <div class=\"artist-details\">
    <?php
    $artistimageCode = get_post_meta ($post ->ID, 'artist-image', true);
    $websiteCode = get_post_meta ($post ->ID, 'website-address', true);
    $myspaceCode = get_post_meta ($post ->ID, 'myspace', true);
    ?>

    <img src=\"<?php echo $artistimageCode; ?>\" width=\"200\" height=\"250\" alt=\"music box for life artist\" />
    <p>Website: \" target=\"_blank\"></p>
    <p>Myspace: \" target=\"_blank\"></p>
    </div>
    <!-- artist details close -->

    <!-- ARTIST CLOSE -->
  • I have already replied to this and moved the thread to a more appropriate section:

    viewtopic.php?f=10&t=4576
This discussion has been closed.
All Discussions