Projects Engine

init

In WordPress, an init hook is a type of action hook that fires at the beginning of each page load, after WordPress has finished loading the core files but before any headers or content are output.

Home / Dictionary / init

In WordPress, an init hook is a type of action hook that fires at the beginning of each page load, after WordPress has finished loading the core files but before any headers or content are output. This hook provides a way for developers to execute custom code or functions at the earliest possible point in the WordPress loading process.

The init hook can be used for a variety of tasks, such as registering custom post types, adding custom taxonomies, setting up custom user roles, and more. To use the init hook, you can create a function that contains your custom code and then add that function as an action to the init hook using the add_action() function.