Extending theme features through available filters and actions

We already discussed the importance of using child themes to customize and extend theme templates. Using the WordPress filter and action hooks is another way of customizing theme features. We will mainly use these hooks to extend the functions provided by the theme. However, we can use some of the filter and action hooks to change parts of templates without needing to replace them completely.

In WordPress, an action is a PHP function that is executed at specific points in a process. A filter is a function that is used to modify the existing data or features in a process. Even though actions are intended to do something before or after an event, they are used frequently to add ...

Get WordPress Development Quick Start Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.