Part of WordPress’s power is the fact that it is so extensible. The tools in the WordPress toolbox to achieve this are hooks, actions and filters. But some of the documentation can be very intimidating, so in less than 200 words I will provide you with a basic guide to WordPress hooks, actions and filters.
Hooks simply refer to where your custom code will be executed.
There are two types of hooks: action hooks and filter hooks.
Action hooks do something in your code. (You can either add or remove actions using the very handy and intuitive code: add_action or remove_action)
Filter hooks modify something in the code, so instead of doing something entirely new or different…it simply changes your code. The very intuitive code to add a filter is: add_filter.
That’s it, a very basic guide to hooks, actions and filters for WordPress.
Read more: