I'm currently using the Post Content Template functionality to successfully display populated custom fields in the post body content.
What I'm also trying to do is display a selected number of custom fields on a homepage teaser using the standard custom field syntax within the loop:
<?php echo get_post_meta($post->ID, "asking-price", true); ?>
For some reason I can't get it to work.
Custom fields are there, see screen shot here ( http://yfrog.com/b5cymp) but for some reason the get_post_meta function is not returning the value.
Could there be something I'm missing here? If the custom field was successfully submitted to the post, then there should be no problem calling it to display anywhere on the site I choose, just like any other custom field, correct?
Here is my code:
</tbody>
<td class="label">Asking Price:</td>
<td class="value"><?php echo get_post_meta($post->ID, "asking-price", true); ?></td>
</tr>
<tr>
<td class="label">Estimated Rehab Cost:</td>
<td class="value"><?php echo get_post_meta($post->ID, 'rehab-cost', true); ?></td>
</tr>
<tr>
<td class="label">Potential Profit:</td>
<td class="value"><?php echo get_post_meta($post->ID, 'potential-profit', true); ?></td>
</tr>
</tbody>