Custom Fields
Re-Envisioned
Support Meta Box - Beaver Themer Integrator Number field with value of "0" returns empty

  • Creator
    Topic
  • #32485
    Resolved Craig Paterson
    Participant

    Hi there,

    I have created a numeric field called "dogs" which I want to use to display how many dogs are allowed to stay in a property. When I enter 1, 2, 3 etc it works perfectly well, but when I enter 0 (zero), the field shows as empty when rendered on the front end.

    I am using the following shortcode – [wpbb post:meta_box field='dogs']

    I have tried changing the field to a Text field, but the issue is the same.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #32488
    Long Nguyen
    Moderator

    Hi,

    I do not see that issue on my end, screen record https://www.loom.com/share/84889eba6ec74469ae2c786f1bdbdce6

    #32490
    Craig Paterson
    Participant

    Hi,

    Thanks for showing me it working at your end. I have recorded a video showing what is happening at my end. I am using the shortcode in a Beaver Themer Layout, so I don’t know if that is the issue.

    https://cln.sh/x397KIFEqr76cLdTfwRd

    WordPress: 5.8.2
    Beaver Builder: 2.5.0.2
    Beaver Themer: 1.4
    MetaBox: 5.4.8
    MetaBox AIO: 1.15.2

    #32495
    Long Nguyen
    Moderator

    Hi,

    I'm using
    Beaver Builder Pro: 2.2.6.1
    Beaver Themer: 1.2.1.1

    Using the shortcode to get the post meta value might not need Meta Box. You can try to contact Beaver support to ask for help with this case.

    #32496
    Craig Paterson
    Participant

    Hi,

    I have already made contact with BB, as the same issue happens with Advanced Custom Fields using Beaver Themer 1.4. If I change to Beaver Themer 1.3.3.1, everything works as it should.

    Thank you for your guidance and help.

    Best regards,
    Craig

    #32519
    Craig Paterson
    Participant

    I have received info from the Beaver Builder team that they have added "better expression support in Beaver Themer 1.4", so this means that in a number field, 1 = True and 0 = False.

    They now recommend the following for displaying the 0 instead of returning false…

    [wpbb-if post:meta_box type='number' name='number_dogs' exp='not_equals' value='']
    [wpbb post:meta_box type='number' name='number_dogs']
    [wpbb-else]
    0
    [/wpbb-if]

    Just thought I would share that in case anyone else requires it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.