Title: [if] leadings zero bug?
Last modified: October 31, 2020

---

# [if] leadings zero bug?

 *  [iantresman](https://wordpress.org/support/users/iantresman/)
 * (@iantresman)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/if-leadings-zero-bug/)
 * I have a ACF field holding a number. When I try and display a single 0, it does
   not display, whereas other values are OḲ eg:
 * The ACF field “number” holds “8”
    `[if field=number value=7,8,9]0[else]x[/if]`
   shows nothing `[if field=number value=7,8,9]00[else]x[/if]` shows 00 `[if field
   =number value=7,8,9]@[else]x[/if]` shows @ `[if field=number value=7,8,9]&-#048;[
   else]x[/if]` shows 0
 * I can’t see a reason that the number 0 will not display (it does display as an
   HTML entity, &-#048;) Note that the entity includes a bogus – in order to display
   here.
    -  This topic was modified 5 years, 6 months ago by [iantresman](https://wordpress.org/support/users/iantresman/).
    -  This topic was modified 5 years, 6 months ago by [iantresman](https://wordpress.org/support/users/iantresman/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [polarracing](https://wordpress.org/support/users/polarracing/)
 * (@polarracing)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/if-leadings-zero-bug/#post-13605715)
 * Workaround:
 *     ```
       [set my-zero]0[/set]
       [if field=number value=7,8,9][get my-zero][else]x[/if]
       ```
   
 *  Thread Starter [iantresman](https://wordpress.org/support/users/iantresman/)
 * (@iantresman)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/if-leadings-zero-bug/#post-13605742)
 * Good workaround, but it shouldn’t be necessary?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[if] leadings zero bug?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [iantresman](https://wordpress.org/support/users/iantresman/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/if-leadings-zero-bug/#post-13605742)
 * Status: not resolved