• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
WP Engine Genesis Themes

WP Engine Genesis Themes

Resources and help for the Genesis community

  • Need Help?
You are here: Genesis Framework / Hook Reference

Hook Reference

Note: See An Introduction to Hooks for details on how to use hooks when customizing your theme.

Below is a categorized list of hooks that are available within the Genesis Framework

  • Internal Action Hooks
  • Document Head Action Hooks
  • Structural Action Hooks
  • Loop Action Hooks
  • Comment Action Hooks

Internal Action Hooks

genesis_pre


This is the first hook to execute within Genesis. Any function hooked to it executes before any Genesis functions have loaded.

genesis_pre_framework


This hook executes immediately before any of the Genesis Framework components have been loaded, but after all the constants have been defined.

Back to Top

Document Head Action Hooks

genesis_title

This hook executes between tags and outputs the doctitle. You can find all doctitle-related code in /lib/structure/header.php.

genesis_meta


This hook executes in the section of the document source. By default, this hook is used to output items like META descriptions and keywords, along with the default stylesheet and the reference to the favicon.

Back to Top

Structural Action Hooks

genesis_before


This hook executes immediately before the content, but after the opening tag in the document source.

genesis_after


This hook executes immediately after the content, but before the closing tag in the document source.

genesis_before_header


This hook executes immediately before the header (outside the #header div).

genesis_header

By default, this hook outputs the header code, including the title, description, and widget area (if necessary).

genesis_after_header


This hook executes immediately after the header (outside the #header div).

genesis_site_title


By default, this hook is used to output the site title, within the header area. It uses the user-specified SEO settings to build the site title markup appropriately.

genesis_site_description


By default, this hook is used to output the site description, within the header area. It uses the user-specified SEO settings to build the site description markup appropriately.

genesis_before_content_sidebar_wrap

This hook executes immediately before the div block that wraps the content and the primary sidebar (outside the #content-sidebar-wrap div).

genesis_after_content_sidebar_wrap


This hook executes immediately after the div block that wraps the content and the primary sidebar (outside the #content-sidebar-wrap div).

genesis_before_content


This hook executes immediately before the content column (outside the #content div).

genesis_after_content


This hook executes immediately after the content column (outside the #content div).

genesis_sidebar


This hook outputs the content of the primary sidebar, including the widget area output.

genesis_before_sidebar_widget_area

This hook executes immediately before the primary sidebar widget area (inside the #sidebar div).

genesis_after_sidebar_widget_area


This hook executes immediately after the primary sidebar widget area (inside the #sidebar div).

genesis_sidebar_alt


This hook outputs the content of the secondary sidebar, including the widget area output.

genesis_before_sidebar_alt_widget_area


This hook executes immediately before the alternate sidebar widget area (inside the #sidebar-alt div).

genesis_after_sidebar_alt_widget_area


This hook executes immediately after the alternate sidebar widget area (inside the #sidebar-alt div).

genesis_before_footer

This hook executes immediately before the footer, outside the #footer div.

genesis_footer


This hook, by default, outputs the content of the footer, including the #footer div wrapper.

genesis_after_footer


This hook executes immediately after the footer, outside the #footer div.

Back to Top

Loop Action Hooks

genesis_before_loop


This hook executes immediately before all loop blocks. Therefore, this hook falls outside the loop, and cannot execute functions that require loop template tags or variables.

genesis_loop


This hook outputs the actual loop. See lib/structure/loop.php and lib/structure/post.php for more details.

genesis_after_loop

This hook executes immediately after all loop blocks. Therefore, this hook falls outside the loop, and cannot execute functions that require loop template tags or variables.

genesis_after_endwhile


This hook executes after the endwhile; statement in all loop blocks.

genesis_loop_else


This hook executes after the else : statement in all loop blocks.

genesis_before_entry (HTML5)


This hook executes before each entry in all loop blocks (outside the post_class() container).

genesis_after_entry (HTML5)


This hook executes after each entry in all loop blocks (outside the post_class() container).

genesis_entry_header (HTML5)


This hook executes before the entry content and generates the entry header content in all loop blocks.

genesis_before_entry_content (HTML5)


This hook executes before the .entry-content container in all loop blocks.

genesis_entry_content (HTML5)


This hook executes within the .entry-content container in all loop blocks.

genesis_after_entry_content (HTML5)


This hook executes after the .entry-content container in all loop blocks.

genesis_entry_footer (HTML5)


This hook executes after the entry content and generates the entry footer content in all loop blocks.

The following XHTML hooks should only be used for sites using XHTML themes and Genesis versions earlier than 3.0.0. XHTML is no longer used in Genesis 3.0.0+.

genesis_before_post (XHTML)

This hook executes before each post in all loop blocks (outside the post_class() div).

genesis_after_post (XHTML)


This hook executes after each post in all loop blocks (outside the post_class() div).

genesis_before_post_title (XHTML)


This hook executes immediately before each post title for each post within the loop.

genesis_post_title (XHTML)


This hook outputs the actual post title, contextually, based on what type of page you are viewing.

genesis_after_post_title (XHTML)


This hook executes immediately after each post title for each post within the loop.

genesis_before_post_content (XHTML)


This hook executes immediately before the post/page content is output, outside the .entry-content div.

genesis_post_content (XHTML)


This hook outputs the actual post content and if chosen, the post image (inside the #content div).

genesis_after_post_content (XHTML)


This hook executes immediately after the post/page content is output, outside the .entry-content div.

Back to Top

Comment Action Hooks

genesis_before_comments


This hook executes immediately before the comments block (outside the #comments div).

genesis_comments


This hook outputs the entire comments block, including the section title. It also executes the genesis_list_comments hook, which outputs the comment list.

genesis_after_comments


This hook executes immediately after the comments block (outside the #comments div).

genesis_list_comments


This hook executes inside the comments block, inside the .comment-list OL. By default, it outputs a list of comments associated with a post via the genesis_default_list_comments() function.

genesis_before_pings


This hook executes immediately before the pings block (outside the #pings div).

genesis_pings


This hook outputs the entire pings block, including the section title. It also executes the genesis_list_pings hook, which outputs the ping list.

genesis_after_pings


This hook executes immediately after the pings block (outside the #pings div).

genesis_list_pings


This hook executes inside the pings block, inside the .ping-list OL. By default, it outputs a list of pings associated with a post via the genesis_default_list_pings() function.

genesis_before_comment

This hook executes before the output of each individual comment (author, meta, comment text).

genesis_after_comment


This hook executes after the output of each individual comment (author, meta, comment text).

genesis_before_comment_form


This hook executes immediately before the comment form, outside the #respond div.

genesis_comment_form


This hook outputs the actual comment form, including the #respond div wrapper.

genesis_after_comment_form


This hook executes immediately after the comment form, outside the #respond div.

Back to Top

Primary Sidebar

Genesis Blocks and Custom Blocks Documentation

  • Genesis Blocks Docs
  • Genesis Custom Blocks Docs
  • Genesis Block Theme Docs

Genesis Framework Documentation

  • Genesis Framework Docs
  • Genesis Sample Theme Docs
  • Genesis Framework Developer Docs

© 2013–2026 WPEngine, Inc. All rights reserved. WP ENGINE®, VELOCITIZE®, TORQUE®, EVERCACHE®, and the cog logo service marks are owned by WPEngine,Inc.
1WP Engine is a proud member and supporter of the community of WordPress® users. The WordPress® trademarks are the intellectual property of the WordPress Foundation, and the Woo® and WooCommerce® trademarks are the intellectual property of WooCommerce, Inc. Uses of the WordPress®, Woo®, and WooCommerce® names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation or WooCommerce, Inc. WP Engine is not endorsed or owned by, or affiliated with, the WordPress Foundation or WooCommerce, Inc.