Title: Custom Fields
Last modified: August 20, 2016

---

# Custom Fields

 *  [broadleon](https://wordpress.org/support/users/broadleon/)
 * (@broadleon)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/custom-fields-46/)
 * Hi
 * If I have a empty custom field, I would like a <span class tag to show>
 * So I wrote
 * <?php
    if ($price == ”) { echo ‘<span class=”band outofstock”></span>’; } ?>
 * However this just shows <span class=”band outofstock”> regardless of $price being
   empty or not.
 * Can any one give me some pointers?

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/custom-fields-46/#post-2335869)
 * How does the custom field get fed into the $price variable?

Viewing 1 replies (of 1 total)

The topic ‘Custom Fields’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/custom-fields-46/#post-2335869)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
