So you want to customize the footer in your Genesis child theme but are not sure how to do it. You have at least two options.
- Modify the footer output using the
- Add an action using the
Both of these options are built into the Genesis Framework. The big difference between the two depends on whether or not you want to work with shortcodes or use HTML.
Option 1: genesis_footer_output Filter
The first option is to use
genesis_footer_output. This is a filter hook called in the
genesis_footer function. In this function, Genesis uses apply_filters() to attach the filter hook to the
do_shortcode()callback function. The default results of this series of events is shown below.
<p>[footer_copyright before="Copyright "] · [footer_childtheme_link before="" after=" on"] [footer_genesis_link url="https://www.studiopress.com/" before=""] · [footer_wordpress_link] · [footer_loginout]</p>
As is suggested by the
do_shortcode() callback function, shortcode values are expected. They are identified above as text enclosed within opening and closing brackets [ ]. These shortcodes can also use attributes. For a complete list of options see Genesis Shortcodes.
Option 2: genesis_footer Hook
The second option is to hook into the
genesis_footer by adding one or more actions to it. Below is default output of the Genesis Framework. This code is found in the framework’s
add_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); add_action( 'genesis_footer', 'genesis_do_footer' ); add_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
Depending on your goal, add additional actions with
add_action() or remove the existing ones with
[gist id=”0a9c8cd9474046069d388ceccb094473″ file=”functions.php”]
Bonus Content: WordPress Dashboard
There is actually another option to choose if you are not interested in writing code. In the WordPress Dashboard, customize your Genesis site footer by navigating to Appearance → Customize → Theme Settings → Footer to customize your footer that is an option too. Once there refer to Genesis Shortcodes for available options.
NOTE: If you use the
genesis_footer_output filter hook the above WordPress Dashboard option will not be available.