• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2552

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Register
  • Videos
  • Log in

New Genesis 2.0 HTML 5 Loop Hooks & How To Use Them

You will need to add HTML 5 support to your Genesis child theme in order to make these new hooks work.

On top of this, the old XHTML markup in existing child themes will need to be converted to HTML 5 as well. Otherwise, you’ll probably find your site is messed up.

Once you’ve done all that, you can then change any existing loop hooks or use the new loop hooks in your child themes functions.php file with custom functions.

Genesis Hook Comparison

New HTML 5Old XHTML
genesis_before_entry genesis_before_post
genesis_entry_headergenesis_before_post_title
genesis_entry_headergenesis_post_title
genesis_entry_headergenesis_after_post_title
genesis_entry_headergenesis_before_post_content
genesis_entry_contentgenesis_post_content
genesis_entry_footergenesis_after_post_content
genesis_after_entrygenesis_after_post
Note: You must install Genesis 2.0 and add support for HTML 5 to your child theme before using the new hooks.

List Of All New HTML 5 Loop Hooks

Includes the 3rd parameter for positioning priority.

Old Loop Hooks

XHTML Loop Hooks

New Loop Hooks

html 5 hooks

Note: If HTML5 is not active, the genesis_loop uses the old hooks and XHTML markup.

Lets look at a real code snippet which is tested and works.

Example:

This code will add a widget area after single posts and pages using the new genesis_after_entry_content hook. That’s the only change in this code.

The code will NOT work unless you have added HTML 5 support to your child theme and activated Genesis 2.0.

Line 8 in this code shows you the new hook.

Simply updating to Genesis 2.0 is not enough to make this code work. The new hooks are dependent on HTML 5 supported child themes.

Old Hook Example

genesis_after_post_content

New Hook Example

genesis_after_entry_content

I’ll be posting more useful code snippets using the new hooks shortly.

Basic Functions Using New Hooks

Basic Functions Using Old Hooks

Useful Resources

  • Genesis Visual Hook Map

Action Hooks

Primary Sidebar

How it works :

I write tutorials for you which include the custom code you need for a flat $49.99 fee. You get 1 tutorial request as well as access to all 2500+ existing tutorials for 1 month.

  • Premium Members Only
  • Sign Up
  • Support