The make_site_theme_from_oldschool() WordPress PHP function creates a site theme from an existing theme.
Usage
make_site_theme_from_oldschool( $theme_name, $template );
Example:
make_site_theme_from_oldschool( 'My New Theme', 'my-new-theme' );
Parameters
$theme_name
(string) – Required. The name of the theme.$template
(string) – Required. The directory name of the theme.
More information
See WordPress Developer Resources: make_site_theme_from_oldschool()
Examples
Create a child theme from an existing theme
This example creates a child theme from the existing “Twenty Twenty-One” theme.
make_site_theme_from_oldschool( 'Twenty Twenty-One Child', 'twentytwentyone-child' );
Create a site theme from a custom theme
This example creates a site theme from a custom theme called “Custom Theme.”
make_site_theme_from_oldschool( 'Custom Theme Site', 'custom-theme-site' );
Create a site theme from a third-party theme
This example creates a site theme from a third-party theme called “Third Party Theme.”
make_site_theme_from_oldschool( 'Third Party Theme Site', 'third-party-theme-site' );
Create a site theme with a custom directory name
This example creates a site theme with a custom directory name “custom-directory.”
make_site_theme_from_oldschool( 'Custom Directory Theme', 'custom-directory' );
Create a site theme from an existing theme with special characters
This example creates a site theme from an existing theme with special characters in the name.
make_site_theme_from_oldschool( 'Special & Unique Theme', 'special-unique-theme' );