From the course: Learning Genesis for WordPress

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Modifying themes with hooks and filters

Modifying themes with hooks and filters

From the course: Learning Genesis for WordPress

Start my 1-month free trial

Modifying themes with hooks and filters

- [Instructor] When you create a WordPress theme without using Genesis, the template files include the HTML markup used to define the structure of your website. To make changes to the HTML structure or attributes, you edit that HTML directly in the template files. By contrast, when you build child themes with Genesis, Genesis provides the HTML for you. Your child themed template files contain very little HTML. And if you want to alter the HTML that Genesis produces, you do that by using hooks and filters within your child theme. Although this is a different approach, it brings some huge benefits. For starters, you get much more control over all the HTML output on a page. For example, let's say you wanted to change just a little bit of markup, like maybe a custom CSS class to the comment form. With traditional WordPress templating, you'd have to rewrite the entire comment form for every custom instance you wanted. With…

Contents