Support Forum
Support › Meta Box - Beaver Themer Integrator › Test for values with shortcodes
Hi,
Did I miss something or is it impossible to test for values with shortcodes?
For ACF this works:
[wpbb-if post:acf type='text' name='string_value' exp='equals' value='try me out']
True: ACF field called string_value equals the test value "try me out".<br>
string_value is "[wpbb post:acf type='text' name='string_value']"
[wpbb-else]False: ACF field called string_value does not equal the test value "try me out".<br>
string_value is "[wpbb post:acf type='text' name='string_value']"
[/wpbb-if]
The following doesn't work. Looks like name is not detected. I also tried id to no avail
[wpbb-if post:meta_box type='text' name='string_value' exp='equals' value='try me out']
True: Meta Box field called string_value equals the test value "try me out".<br>
string_value is "[wpbb post:meta_box type='text' field='string_value']"
[wpbb-else]False: Meta Box field called string_value does not equal the test value "try me out".<br>
string_value is "[wpbb post:meta_box type='text' field='string_value']"
[/wpbb-if]
Thanks,
Lukas
Hi,
Thank you for reaching out.
I'm not sure the way Beaver shortcode logic works but if you want to use the Beaver conditional logic, please follow this article https://metabox.io/introducing-beaver-themer-conditional-logic-integration/.
Refer: https://support.metabox.io/topic/beaver-builder-conditional-logic-help/
Hi Long,
thanks for your answer.
Sure I know how to use Beaver Themer's conditional logic feature.
The reason why I ask is that the shortcode way provides a second layer of conditionals for ACF and Pods, which is sometimes very helpful.
Interestingly testing for presence of field content works:
[wpbb-if post:meta_box type='text' field='string_value']
Content of the field:[wpbb post:meta_box type='text' field='string_value']
[/wbpp-if]
The content only shows if the field has any.
Please dive into this and take it as a feature request – I'm confident that it's not asking for rocket science to make it work also for Meta Box.
Kind regards,
Lukas
Hi,
Thanks for your feedback.
I will inform the development team to consider adding it to the roadmap of this extension to support Beaver conditional shortcode.