Home › Forums › Developing Websites › HTML PHP Snippets › Genesis 2 Theme Framework › Genesis 2 tutorial – hook references
This topic contains 0 replies, has 1 voice, and was last updated by Mitz 6 years, 3 months ago.
-
AuthorPosts
-
August 24, 2013 at 11:43 pm #30007
I was trying to customize my theme but I have Genesis 2 and there are new hooks. You need to have html 5 enabled to use these new hooks. I installed Genesis 2 and then one of the new themes that was already html 5 ready.
Old (Pre_HTML) Hook ==> New (HTML) Hook
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_entryHere is a picture showing where the new hooks are.
this really helped me.
img cred: wpsites.net
Full list of reference hooksfrom http://studiopress.com/docs/hook-reference/#structural-action-hooks (you can only access this if you buy genesis)
Now you can see where to replace the new hooks:
genesis_pre: This is the first hook to execute within Genesis. Think of any function hooked to it as being executed 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.
genesis_init: This hook fires at the end of the /lib/init.php file. Think of any function hooked to it as being executed after all Genesis functions have loaded, but before any custom code in the child functions.php file is run.
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, things like META descriptions and keywords are output using this hook, along with the default stylesheet and the reference to the favicon.
genesis_before: This hook executes immediately after the opening tag in the document source.
genesis_after: This hook executes immediately 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 outputs 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 outputs 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.
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_post: This hook executes before each post in all loop blocks (outside the post_class() div).
genesis_after_post: This hook executes after each post in all loop blocks (outside the post_class() div).
genesis_before_post_title: This hook executes immediately before each post title for each post within the loop.
genesis_post_title: This hook outputs the actual post title, contextually, based on what type of page you are viewing.
genesis_after_post_title: This hook executes immediately after each post title for each post within the loop.
genesis_before_post_content: This hook executes immediately before the post/page content is output, outside the .entry-content div.
genesis_post_content: This hook outputs the actual post content and if chosen, the post image (inside the #content div).
genesis_after_post_content: This hook executes immediately after the post/page content is output, outside the .entry-content div.
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.
-
AuthorPosts
You must be logged in to reply to this topic.