WordPress Developer Ukraine, Kyiv
WordPress get_theme_mod vs get_option: When to Use Theme Mods and When to Use the Options API

WordPress get_theme_mod vs get_option: When to Use Theme Mods and When t ...

get_theme_mod() or get_option(): where to store settings WordPress has two places for settings. Theme mods (get_theme_mod(), set_theme_mod()) belong to the active theme and are stored together in one option per theme. Options (get_option(), update_option()) belong to the site and stay when the theme changes. Choosing the wrong one means settings that disappear after a theme…