I could take advantage of get_template_part( $slug, $name )
and use it like:
get_template_part( 'theme-options', get_current_blog_id() );
Say we are on blog_id
5, if theme-options-5.php exists it will be loaded. If not theme-options.php will be loaded as a fallback. Please note that get_template_part
is using require
.
Related Posts:
- Theme Options Doesn’t Work On WP Multisite
- WordPress API Menu/Submenu Order
- How to set permalink structure via functions.php
- What are the advantages and disadvantages of Option Tree over the Customization API?
- How do I add settings to the Background Options Page?
- How To Add New Option Types To Option Tree?
- Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?
- What WP folder can I use to write files to?
- WordPress Settings API error
- Add a dropdown to theme customizer
- Understanding wp_add_inline_style
- Add a new checkbox in theme options
- How to add Color Picker in Theme Options for the following?
- Setting multiple default background images?
- Best practice way to implement custom sections into a WordPress theme
- Best practice (forward compatibility) for theme options
- How to set the default value of a option in a theme?
- Where is default wp_head() implemented?
- Add a preview to a WordPress Control Panel
- Can You Export Theme Settings From WordPress Multisite?
- date_i18n() issue
- WordPress settings API error when checkbox unchecked
- How to deploy a new theme/theme options from staging to production site
- WordPress Customizer Typography: How to load just the unique Google Fonts?
- What is the best way to export and import theme options?
- esc_url not working within add_settings_field callback
- How to remove menus section from WordPress theme customizer
- WordPress Errors in generated by theme check plugin [closed]
- WordPress Theme customisation CSS
- Select front page and blog page in custom theme settings page
- WordPress Multisite: Have the same header and footer of main-blog on all sub-blogs
- Display site admin profile fields in header.php
- Using the theme options to change background
- How to test for MU via functions.php?
- Cannot update WordPress General Settings Site Title and Tagline
- Theme Options page not showing up in admin menu
- Same footer on all multisites blogs
- Excluding a page with a certain name from wp_page_menu
- How to hook CSS file according to theme selection in the customizer section
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Change setting name in Customizer and keep the data
- Is there a way to activate different theme for specified users? [closed]
- after_setup_theme, Global Variable and Theme Customizer
- How can I disable/hide certain themes in multisite?
- Is there an action for save_menu and/or update_menu?
- Change the template of multiple multisite pages at the same time
- For best DB performance should I serialize all theme options together or by type?
- Set multiple templates per post
- Creating Theme Options Page
- Location of theme options page menu icon
- WordPress add options to theme not displaying
- In wordpress customizer div still showing even if I hid it with javascript
- Customizer API Multi Sections in single Panel
- Theme does not allow shortcodes
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- What is an alternative to not using child theme to customize a WordPress theme?
- How to get full native language instead of iso?
- How to make menus, footer, sidebars multi language
- using themename_the_custom_logo() in template-tags?
- Why does the theme of secondary site load the primary one in WordPress Multisite? [closed]
- Let user publish posts on community page
- I updated my own theme’s code and css
- Theme option page doesn’t save options
- How to customize the colors within a stylesheet using a WordPress setting
- How to hide blog by id wordpress multisite listing
- Create settings field on button click
- how can I re-utilize and class on a child theme
- how to call options on front end and add logo
- how to create export / import theme options in wordpress without plugin
- Can I use WP Multi-site on a sub-domain with a different theme but use all the original site’s posts/pages?
- Customizer_register theme options not saving
- How can I include the js and css file of my custom theme dynamically in header.php
- Undefined index: custom_sidebars
- Create new sidebars trough admin post/page metabox
- Using Customizer value in an external PHP file inside a theme
- Mutlisite in wordpress is not working
- background_image support multiple image size?
- How can I demonstrate themes well?
- “No Data Received” error in Chrome every time i try to update the theme functions file
- trying to figure out how to use more that one image upload in the same section in theme customizer
- WordPress two sidebar layout or theme
- Theme automatically inserting “more” tag on every post
- Theme Option’s Save Button is not working
- Custom widgets in theme option page
- wp_deregister_script was called incorrectly
- The content not wrapped in paragraph tags with get_page_by_title()
- Subsite theme mystery man replacement with Buddypress on main site [closed]
- Custom link color or stylesheets
- Undefined index: debuging error for theme option template snippet
- How to Disable Color Options?
- Import/Export WordPress demo
- Turning WordPress Into full-featured website?
- How to make admin theme option with image slide show?
- Theme.json: creating different sections of the color palette
- Is it ok if I use this tag?
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- Remove nonindex meta tag
- TItle In Latest Post is not using H1 Tag [closed]
- Export WordPress theme with modifications for other site
- WordPress 6.4.2 – can’t load editor style css using ‘after_setup_theme’ or ‘admin_init’ actions