Customizing Genesis Footer Content
Sometimes need to change the Genesis‘s default content on demand of client to show clients requirement (i.e. footer logo, remove back to top, credential change, add footer link).
NOTE: When writing your own code/filters, use a child theme. Do not write to the default functions.php file in Genesis. It will overwrite on updates.
See below for codes I wrote to change Genesis Footer Content on child themes.
Customize the footer creds text
add_filter('genesis_footer_creds_text', 'auc_footer_creds_text');
function auc_footer_creds_text($creds) {
$creds = '©' . date('Y') . ' '
. get_bloginfo('name') .
'. All rights reserved. Powered by <a href="http://wordpress.org/">WordPress</a>.';
echo $creds;
}
Remove Footer Content
This will remove the footer credits text and ‘back to top’ link.
add_filter('genesis_footer_output', 'footer_output_filter', 10, 1);
function footer_output_filter($footer_content) {
$footer_content = '';
return $footer_content;
}
Add a WordPress Custom Menu in Custom Footer.
This will remove the default footer with credit text and Back to Top and add a WordPress custom navigation menu.
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'auc_do_footer' );
function auc_do_footer() {
$creds = '© Copyright '. date('Y') . ' ' . get_bloginfo('name') . ' . All rights reserved.';
$footernav = wp_nav_menu( array('menu' => 'footer' ));
echo $footernav;
?>
Leave a Reply
Want to join the discussion?Feel free to contribute!