Custom Fields on Wordpress

Discussion in 'WordPress' started by kelp, Nov 8, 2008.

  1. #1
    I'm currently using Flutter Post, and I made a custom field for Merchant. I'm trying to make it so that when I type in: Best Buy in one of my posts for merchant, it will say merchant in my post. Here's the code I'm using:
    <?php if ( get_post_meta($post->ID, 'merchant', true) ) { ?>
    <?php echo $merchant; ?>
    <?php } else { ?>
    <?php } ?>
    Code (markup):
    It doesn't seem to display the word Best Buy, though.
     
    kelp, Nov 8, 2008 IP
  2. dpsubi1

    dpsubi1 Notable Member

    Messages:
    9,318
    Likes Received:
    420
    Best Answers:
    0
    Trophy Points:
    280
    #2
    merchant is a custom field correct then you can try get_post_custom_values("merchant")
     
    dpsubi1, Nov 9, 2008 IP