• Hi, I am trying to build a custom function around navigation menus, and was just wondering if there is there a function to save menu just by parsing in the menu id into theme_mods_themename?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You can use set_theme_mod() to save a value in the theme_mod serialized array. Then retrieve it with get_theme_mod().

    You shouldn’t attempt to parse a serialized array anyway. PHP has functions to unserialize and seriallize data arrays. You could then access the values through the resulting associative array. But by using the above functions, WP does the serialization and array access for you, you merely set and get individual values.

Viewing 1 replies (of 1 total)
  • The topic ‘parsing in the menu id into theme_mods_themename’ is closed to new replies.