When I save header options, it goes away

I'm trying to set up my header using my site title. When I save my options, it reloads with nothing selected.

The same happens with "Show store picker" too.

  • Kimberly
    • Champion of Loops

    Hello karlalopez!

    Sorry you are having trouble with this, upon looking i've found a couple of fixes.

    It seems to be an issue with multilingual sites and how everything gets translated. I'll share two fixes with you.

    This one is from the theme developer: It's a bit much to copy and it contains a bit of code, so to make sure I don't loose anything I'll just give you the link.
    https://premium.wpmudev.org/forums/topic/type-of-header-in-gridmarket-theme-options-to-title-in-blog-template-is-not-working

    The second is from another member who was having the same issue as yourself:

    My users have the option to show the admin interface in a different language, and since the option values are escaped and translated through esc_attr_e(), there's a mismatch when comparing the values on the options page and in the theme (and possibly other places).

    I got it to work by using esc_attr() instead.

    Example (framemarket/options/options-setup.php):
    Before:
    <input type="radio" name="framemarket_theme_options[logoinput]" value="<?php esc_attr_e( $option['value'] ); ?>" <?php echo $checked; ?> />

    After:
    <input type="radio" name="framemarket_theme_options[logoinput]" value="<?php echo esc_attr( $option['value'] ); ?>" <?php echo $checked; ?> />

    Please let me know if this works!. I'll mark this as resolved but will be waiting for your answer :slight_smile:

    Best,

    Kimberly

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

  • Patrick
    • Support Monkey

    Hiya Kimberly,

    Bingo! We were trying to resolve issues around translation in Q&A in another thread before Arun & Mohanjith came aboard: https://premium.wpmudev.org/forums/topic/nothing-shows-up-in-my-setting-tab

    esc_attr_e would definitely cause problems as the option values would likely be mangled and not match at all.

    I remember reading about that before on bp.org, but it didn't occur to me today. That's the kind of thing that happens when you hit the half-century mark, I guess :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.