Settings page: boolean-type values display correctly in Bricks, not in front-end
Support › MB Settings Page › Settings page: boolean-type values display correctly in Bricks, not in front-endResolved
- This topic has 6 replies, 2 voices, and was last updated 1 week, 1 day ago by
Peter.
-
AuthorPosts
-
May 24, 2026 at 10:36 PM #49982
Shemzone
Participant**Environment**
- WordPress 7.0 (happened as well with 6.9.4)
- Bricks Builder 2.3.5
- Meta Box 5.12.0
- Meta Box AIO 3.7.1 (includes MB Settings Page)**Description**
I've been tearing my hair out for the past few days
I have a Settings Page (slug:reglages-generaux-site) with a radio field (sub_header_display_radio) with two options:showandhide.The value is correctly stored in the database as a serialized string — confirmed via direct SQL query:
`
SELECT option_value FROM wp_options WHERE option_name = 'reglages-generaux-site'
→ "sub_header_display_radio";s:8:"show" (or "hide" depending of the settings)
`**The problem**
get_option( 'reglages-generaux-site' )andrwmb_meta()both return the correct value ("show"or"hide") inside the **Bricks Builder editor**, but on the **front-end** (logged out or logged in as a non-admin), both consistently returnstring(1) "1"regardless of the actual saved value.This issue only affects boolean-type fields (switch, checkbox, radio). All other field types on the same settings page return correct values on the front-end.
**Steps to reproduce**
1. Create a Settings Page with a radio field (two options)
2. Save a value from the settings page admin UI
3. Read the value withget_option()orrwmb_meta()on the front-end
4. The returned value is"1"instead of the actual option key**Expected behavior**
get_option()andrwmb_meta()should return the saved option key ("show"or"hide") consistently in all contexts.**Actual behavior**
- In Bricks editor: returns correct value ("show"/"hide")
- On front-end: always returns"1"**Additional note**
A direct SQL query bypassing all WordPress filters confirms the correct value is in the database. This suggests a WordPress filter (option_reglages-generaux-siteor similar) may be transforming the value specifically in the front-end context, but I have not been able to identify its origin.May 25, 2026 at 8:53 PM #49986Peter
ModeratorHello Shemzone,
Thanks for reaching out.
If you use a default WordPress theme and add the code to output the field value
get_option( 'reglages-generaux-site' ) or rwmb_meta(), does it show the correct valueshow/hidein the frontend?If so, I believe the issue comes from the Bricks theme. Let me know how it goes.
May 25, 2026 at 10:17 PM #49988Shemzone
ParticipantHi @Peter and thank you for looking into my problem
I tried with Twenty Twenty Five Theme: same issue.
Example from Front end with Twenty Twenty Five

Example from Front end with Bricks

Example from Bricks builder

Example from Bricks builder with other custom fields values from the same settings page

I add the json file if it can be helpful
Custom fields form Settings page (json)Note: I have translated from French the expected values (Show -> Afficher and Hide -> Masquer) as requested in the ticket, but the problem remains the same.
May 25, 2026 at 10:21 PM #49989May 26, 2026 at 8:12 AM #49990Peter
ModeratorHello,
I import your field group to my demo site, use the code below to output the radio field value but don't see any issue
$value = rwmb_meta( 'sub_header_display_radio', ['object_type' => 'setting'], 'custom_settings' ); echo $value; echo '<br>'; $value2 = rwmb_meta( 'statut', ['object_type' => 'setting'], 'custom_settings' ); echo $value2;screenshot https://imgur.com/XgJZHeq
Can you please copy your site to a staging site and share the admin account with me by submitting this form?
https://metabox.io/contact/I will take a look.
May 26, 2026 at 2:35 PM #49991Shemzone
ParticipantHi Peter, I sent a message via the contact form.
Thank you!May 29, 2026 at 8:02 PM #50003Peter
ModeratorThe issue happens because the settings field values are translated with "1" value using Polylang. Removing the translation value will fix the issue.
Thanks.
-
AuthorPosts
- You must be logged in to reply to this topic.
