With traditional WordPress themes, if you want to create a new template (a new Page template, a custom post type, a front page template etc), you would often have to re-write most of the structural markup, write out the Loop, fetch the header, sidebar(s) and footer and likely other bits and pieces as well. In other words, you need to assemble your design from scratch.
On the other hand, Genesis removes all of this work for you. You can load the entire design with a single magic word:
Each template in your Genesis child theme calls up the
genesis function, which is responsible for loading the entire content of the page from the doctype and opening
<html> tag all the way through to the closing
Nuances between templates (such as custom loops, sliders, widget areas and widgetized front pages) are achieved through the use of hooks and filters that essentially modify the output of the
For example, the Executive Pro theme uses the below code to create a custom post type template. It adds or removes certain actions and filters before calling up the
genesis function to load the entire design that it just customized.
This function does not accept arguments.
This function does not return a value but echoes all the content instead.
Filters and Hooks
There are no filters on the output of this function, but it does directly fire the following hooks:
Note that there are more hooks fired indirectly, within some of the above hooks. The
genesis function also loads the header.php and footer.php templates (usually from the parent theme, but from the child theme instead if it contains these templates), which fire even more hooks.
genesis has been included since version 1.3.0.
genesis is located in lib/framework.php.
Relevant tutorials from the Genesis community.