Fires after the theme is loaded.
Source
do_action( 'after_setup_theme' );
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
Fires after the theme is loaded.
do_action( 'after_setup_theme' );
Version | Description |
---|---|
3.0.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
This Hook is called when each page is loaded after theme is initialised. This is used for the basic theme setup, registration of the theme features and init hooks. The basic use of this hook can be seen on the default themes that comes with WordPress Installation.
Following is the example code from twentyfifteen default theme.
Themes can register their own editor colors and optionally lock users into picking from the defined palette.
This is how I try this and it’s works perfectly.
Feel free to copy and paste this code into your functions.php file for a basic setup(common line for every wp theme ) –