Neither.
Theme options should be stored as theme mods, using get_theme_mod
and set_theme_mod
.
Internally these map on to options, but it is the official way to store theme specific options, that way when you change themes you don’t get clashes, and your settings are preserved for if you ever change back. It’s the classic adage of “someone else solved that problem for me, it’s their problem now”
But should you persist in using options, I would advise you prefix all your options with your theme name, and not to share options between child and parent. Setting a child themes options should not affect a site when moving back to a parent theme.
There may be cases when it is advantageous though, so exercise good judgement ( aka use set/get_theme_mod
)
You can find more about this API here
Related Posts:
- Switching among theme customizations
- Color Options from Theme Customizer API not returning via get_theme_mod()
- WordPress activate theme error $pagenow
- Opinions and recommendations on the best barebones base theme [closed]
- Override parent theme translation on child theme
- How to set thumbnail image for a (child) theme
- Best practices for a Style/CSS based theme options page?
- How to use media upload on theme option page?
- How to export/import theme customizer settings?
- Add a page outside of the current theme?
- Jquery in Child Theme
- Removing Shortcodes from Child Theme
- Which settings/options are saved on a theme-basis and how does this affect theme-switching?
- How to avoid loading style.css twice in child-theme?
- Remove action within a class in a parent theme from the child theme
- Theme Activation, Create Database Tables
- WordPress Backup
- How to make alert for new version on theme options?
- I want to run different WordPress websites under the same database
- Child-theme breaks site
- How to mark an option as selected
- get_header(‘header2’) not working properly in child themes
- Is it possible to use child theme of child them?
- Change logo on each page of University Hub theme [closed]
- Delete database tables on theme uninstall?
- How to go about pre generating css file with variables from theme options
- Does uninstalling a WordPress theme delete its database values?
- Cannot find the code for “Edit This” link in posts in a specific theme
- Overwriting templates in child theme and performance
- Defining different theme for Blog posts page
- Themes—Child Themes
- How to set different settings for a mobile theme?
- Child theme not using parent theme css/styles/formatting?
- Child Style.css not overriding parent theme style located in assets/css/main.css
- Disable Theme API / Front end (for API only environment)
- What’s the proper way to include inlined javascript-source?
- What is the major difference between child theme and normal theme
- How to understand a specific bit of WordPress syntax
- How does a Child Theme works?
- Creating new templates in child themes breaks layout
- How to create child theme of already active and customized theme
- How Do I Use A Custom Mobile Theme?
- Custom options below pages/posts editor?
- How to change only one javascript function in wordpress child theme?
- Mobile issue – website isn’t properly detecting screen size [closed]
- Updating my free theme delete all my changes [closed]
- Switching to a child theme
- Getting 503 on various files
- Redux callback action
- Port existing Bootstrap site to WordPress?
- Do not show one specific widget on one specific page
- Is it possible to create child themes using the WordPress Dashboard?
- Preserve theme settings when migrating from local to live
- Functions containing parameter ‘yourtheme’
- How to transform a custom made static HTML website to a WordPress website [closed]
- What is the “pub” theme? [closed]
- Can I create a child theme from a premium theme without losing my posts and page etc that I already have?
- Enqueue custom css file on specific page
- Passing dynamic options from backend to frontend
- Creating a child-theme: CSS not loading
- simplified explanation on child themes?
- Using the same database on another Subdomain
- How to override theme class function to child theme? [closed]
- Issue with theme mod options during domain migration
- Why submenu item’s background color is not changing by css?
- How to add custom JS file in WordPress Child theme with get_theme_file_uri
- .PO file is found but I don’t see translations: how to debug the problem?
- Child theme looks different from parent theme, and incorrectly displays parts
- Where did my Theme Editor go?
- WordPress Theme Breaking on Migration to Live Site [closed]
- Cannot update a file for my theme
- List of categories instead of dropdown menu selector in admin options
- I’ve got a theme I can’t update and won’t let go
- Trying to revive an old wordpress site, but newer versions of wordpress install a different db structure
- Child theme not activating despite success message
- How do I bring a page template into a new theme with separate styling?
- What is an alternative to not using child theme to customize a WordPress theme?
- Minor changes on theme per subdomain – same contents
- Custom homepage with recent blog posts
- Where to find child themes?
- The function is deprecated; use mysql_real_escape_string() instead
- Why does WordPress Editor Only Use Half the Box?
- how to create a section inside a section with theme options customizer
- Strange Theme Error – parent style occasionally showing though child theme
- Warning: call_user_func() expects parameter 1 to be a valid callback
- WordPress Theme Migration Local to Live Assets Not Loading
- How do you make your theme Child Theme-able? [duplicate]
- Create /archive page in WordPress Theme
- How to create a second index.php?
- Child theme after CSS modification
- Overwrite template-tags.php in child theme
- Church hope them issue
- Divi theme including javascript
- 2 WP websites same content different themes
- how to add dynamic footer credit in Greatmag theme [closed]
- Obtaining the original unchanged Theme [closed]
- Why does twentysixteen take a free hand in dealing with longstanding usability principles? [closed]
- Remove Google Fonts from parent theme within a child theme [closed]
- Check if style is declared in child theme from within parent theme. if so, use that style in parent theme
- Custom Theme Additonal CSS “” are transformed to “>” and “<”