The make_site_theme() WordPress PHP function creates a site theme.
Usage
make_site_theme('My Custom Theme');
Parameters
- None
More information
See WordPress Developer Resources: make_site_theme
Examples
Create a Basic Site Theme
Create a basic site theme with a custom name.
// Creates a site theme called 'My Custom Theme' make_site_theme('My Custom Theme');
Create a Site Theme with Child Theme Support
Create a site theme that supports child themes.
// Register a new theme called 'Parent Theme' make_site_theme('Parent Theme'); // Register a child theme for the 'Parent Theme' make_site_theme('Child Theme', 'Parent Theme');
Create a Site Theme with Custom Templates
Create a site theme with custom templates.
// Register a new theme called 'Custom Template Theme' make_site_theme('Custom Template Theme'); // Add custom templates to the theme add_template('header', 'Custom Template Theme'); add_template('footer', 'Custom Template Theme');
Create a Site Theme with Custom Stylesheets
Create a site theme with custom stylesheets.
// Register a new theme called 'Stylish Theme' make_site_theme('Stylish Theme'); // Add custom stylesheets to the theme add_stylesheet('main', 'Stylish Theme'); add_stylesheet('responsive', 'Stylish Theme');
Create a Site Theme with Custom JavaScript Files
Create a site theme with custom JavaScript files.
// Register a new theme called 'Interactive Theme' make_site_theme('Interactive Theme'); // Add custom JavaScript files to the theme add_script('main', 'Interactive Theme'); add_script('additional', 'Interactive Theme');