Support Forum
Support › General › Duplicate output on front end from rwmb_the_value helper function in OxygenResolved
Hi,
I've just started using Metabox.io and I've been trying to output the values from the Checkbox List custom field using the rwmb_the_value helper function.The only argument I'm passing is the field ID. I'm using Oxygen Builder and the values display perfectly well as list items in the builder however when viewed on the front end the list is rendered twice resulting in two identical lists. This may well be an Oxygen issues but has anyone else found this or is there something else I should be doing?
Thanks
Hi Steve,
Could you please let me know how did you show the field value on the front end via Oxygen Builder? A shortcode or a function?
Also, please share some screenshots when you edit the page/post with the Oxygen Builder, I will try to reproduce the issue on my local site.
Refer to this topic: https://support.metabox.io/topic/https-url-of-single-image-original-size/
Hi,
I'm using the rwmb_the_value helper function via the Oxygen dynamic data input field, not a shortcode. The attached images show the function input field and the list rendered in the builder and the duplicated list on the front end.
https://chilp.it/293b65b
https://chilp.it/5781b04
https://chilp.it/03dadf8
Thanks
Steve
Hi,
Please try to wrap the helper function rwmb_the_value()
inside a custom function by using the plugin Code Snippets. It will show only one list as well. Screenshots:
https://share.getcloudapp.com/2Nu0l2jo
https://share.getcloudapp.com/o0uqPkq8
function get_checkbox_list() {
rwmb_the_value( 'checkbox_list' );
}
Hi,
That worked for the front end display and the list appears only once however, the list no longer displays in the Oxygen builder, did that happen with you also?
Thanks
Steve
Hi,
I also experience that. For the simple field, you can use the option Custom field/Meta Options to get the field value immediately in the Builder. Screenshot https://share.getcloudapp.com/xQuY6jQ2.
For the cloneable field or the field that has the setting 'multiple' => true
, you should use a custom function to show the field value in the Builder.
https://docs.metabox.io/fields/checkbox-list/#settings
Ok, thanks for the quick replies and help on this issue.
Steve