WordPress.org

Forums

Why isn't my cutom field values appearing? (1 post)

  1. SlowClicksDotCom
    Member
    Posted 2 years ago #

    I have this custom field for a post:

    key: price
    value: 2000

    I've added this to my loop:

    <div class="buyitnow"><?php $price = get_post_meta($post->ID, 'price', true);
    if ( $price ) { ?>
    Price: $<?php echo number_format($price ,",",",",","); ?>
    <?php } else {} ?></div>

    But all I'm getting is:

    Price: $

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by SlowClicksDotCom
  • This topic is not resolved
  • WordPress version: 3.5