Genesis 2.0 Hook Reference

We love working with the Genesis Framework from StudioPress.

Version 2 was a big update which brought in HTML 5 support for child themes along with the new HTML 5 elements like “section” and “aside” and more importantly new filter and hook names.

If you’re building a new theme using Genesis 2.x then it’s probably not too much of a problem but if you are porting existing themes to HTML 5 then you need to also change any filters and hooks that you have in your functions.php file otherwise it’s not going to work in the same way as it did before.

Brad Dalton’s post is an excellent guide on how to convert your Genesis child theme from XHTML to HTML-5 so I won’t cover that here.

Genesis 2.0 Hook Reference

Here are the new HTML 5 hooks along with their older counterparts.

[table id=2 /]

Important Note

The old hook references could be used with add_action() and add_filter() without any priority parameters.

These new hook references need the priority parameter to work properly.

You can check the StudioPress Code Snippet Library to see what priorities have been used.

Example

In the older XHTML themes, to remove the author box from a single post you would use:
remove_action( ‘genesis_after_post’, ‘genesis_do_author_box_single’ );

In HTML 5 Genesis 2.0 themes, you now use:
remove_action( ‘genesis_after_entry’, ‘genesis_do_author_box_single’, 8 );

Was this article helpful?
YesNo