Learn how to customize the footer in your Genesis child theme using two possible options. First, I’ll show you how to use the
genesis_footer_output filter. Next, we’ll the
genesis_footer hook as a second option. Which option you choose will depend on whether or not you want to work with shortcodes or 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 accept attributes that modifies returned values. For a complete list of options see Genesis Shortcodes.
Option 2: genesis_footer Hook
The second option is to use the
genesis_footer hook by adding one or more actions to it. Below is default implementation of this hook as found in the Genesis Framework which you can read in the
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 existing ones with
[gist id=”0a9c8cd9474046069d388ceccb094473″ file=”functions.php”]
Bonus Content: WordPress Dashboard
There is actually one more option which you could use if you are not interested in writing code. In the WordPress Dashboard, customize the Genesis site footer by navigating to Appearance → Customize → Theme Settings → Footer. Then refer to the to Genesis Shortcodes for a list of available options.
NOTE: When using the
genesis_footer_output filter hook, the option to change the footer is no longer available in the WordPress Dashboard.