Adding Action Hooks to Your WordPress Theme Framework
read more

Adding Action Hooks to Your WordPress Theme Framework


If you’ve been following the earlier parts of this series, you’ll now have:

Understood how theme frameworks work
Identified your approach to developing your own
Created your starting theme files
In this tutorial you’ll add some action hooks to your template files, which you’ll then attach functions to in the next tutorial. After that, you’ll add some filter hooks.

The advantage of creating action hooks in your framework is that any content you attach to them can easily be overwritten by functions in a child theme or by plugins. This saves you creating duplicate template files in your child themes and gives you more flexibility.

Note: If you need to learn more about action and filter hooks before starting, this tutorial will help.