Genesis 2.0 Hooks Reference

Your Guide to Genesis Hooks (version 2.0+)

Author’s note: Even though this is an older post, the information is still accurate. I’ve also published a full reference list of Genesis action and filter hooks you may find useful.

Genesis Framework for WordPressGenesis Framework 2.0 marked some big changes for this WordPress framework, most notably the update from XHTML the more SEO-friendly HTML5. As part of this change, quite a few Genesis hooks were updated as well.

There are already some great posts out highlighting these differences and giving instruction for conversion, like Nick Croft’s post explaining Genesis 2.0, and Brad Dalton’s how-to for converting your theme to HTML5. These are great resources if you’re looking to migrate an older Genesis site to version 2.0+.

What I’d like to do here is a hooks comparison chart for pre-HTML5 hooks vs new HTML5 hooks.

Genesis Hooks Reference

The following is a list of Genesis hooks that changed in v2.0. Please note upgrading to Genesis 2.0 will not break old hooks. In order to take advantage of HTML5 on an pre-2.0 theme, you’ll have to enable HTML5 on purpose. 🙂

The hook changes below are correct, but in order to use them properly, some require the use of priorities*. When in doubt, check the StudioPress code snippet library.
Pre-HTML5 Hook Location
New HTML5 Hook Location
genesis_before_post
genesis_before_entry
genesis_before_post_title
genesis_entry_header
genesis_post_title
genesis_entry_header
genesis_after_post_title
genesis_entry_header
genesis_before_post_content
genesis_entry_header
genesis_post_content
genesis_entry_content
genesis_after_post_content
genesis_entry_footer
genesis_after_post
genesis_after_entry

* According to the WordPress Codex, A priority is an optional integer argument used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order added to the action.

Example

In older Genesis themes not enabled for HTML5, you would remove the post info using this hook:

remove_action( 'genesis_before_post_content', 'genesis_post_info' );

With Genesis 2.0 or themes enabled for HTML5, you’d need to change you that hook location to:

remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );

Therefore genesis_before_post_content should be replaced with genesis_entry_header moving forward.

In Summary

The source code for Genesis 2.0 (and earlier versions, too!) is beautifully documented, so I highly recommend opening up Genesis Framework source files and doing a little light reading. It sounds much more intimidating than it actually is. Just do it.

52 thoughts on “Your Guide to Genesis Hooks (version 2.0+)”

  1. Pingback: Rearranging content using hook order of importance - Once Coupled

  2. Hey thanks for this! I liked the old hook wording. All this ‘after_entry’ took a bit of re-learning to get used. to. Just glad I found your article to help me muddle through it!

Leave a Comment

Your email address will not be published. Required fields are marked *

Carrie Dils uses Accessibility Checker to monitor our website's accessibility.