Genesis Hooks

This page shows you many of the genesis hook positions.

Hooks enable you to execute functions and add new content in different positions in your theme.

If you add the following PHP code to your child themes functions file, you’ll see what i mean.

Custom Function Example #

add_action( 'genesis_after_header', 'wpsites_after_header' );
function wpsites_after_header() {
echo'This text has been added using the genesis_after_header hook';
}

The above code prints some text after the header.

To learn more about hooks, simply change genesis_after_header in the above code to another hook like genesis_before_header.

Adding content in any hook location is super easy using genesis hooks.

One of the best ways to learn more about how hooks work is to spend time playing around with them in a custom function like you see above.

You can use this hook guide to add new widget areas in any location.

Click to Learn More About Hooks

Related Content