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 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. 🙂
* 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.
Pingback: Rearranging content using hook order of importance - Once Coupled
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!