Activation code not running for default theme
-
I am running a network site and have the default theme set in my wp-config file like this:
define( 'WP_DEFAULT_THEME', 'mythemefolder' );
I have some code in the functions.php file that sets up a new role for this theme and am running in the after_switch_theme action. My problem is that my code only runs if I activate another theme and then switch back to this one.
What hook should we use to have code only run once when a theme is first used even when it’s set as the default theme? From what I’ve read, after_setup_theme runs on every page load.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Activation code not running for default theme’ is closed to new replies.