How to Properly Move the Entire Site Footer in Genesis

How to properly move the Genesis site footerWe recently had the need to move the entire .site-footer div in Genesis. There are various tutorials out there that suggest using the following code to relocate your footer content:

remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'new_hook', 'genesis_do_footer' );

However this won’t actually move the entire .site-footer div. On the contrary, it will only relocate the contents of the div, which means you’ll end up with:

  1. An empty .siter-footer div
  2. Your site-footer content orphaned somewhere on your page with no good semantic classes or IDs

Not good, right?

So if you want to properly move the entire site footer, use the following code (making sure to substitute the desired hook in place of new_hook below):

// Move footer
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
add_action( 'new_hook', 'genesis_footer_markup_open', 5 );
add_action( 'new_hook', 'genesis_do_footer' );
add_action( 'new_hook', 'genesis_footer_markup_close', 15 );

Newsletter

Subscribe and stay connected through our Newsletter. We send out important news, tips and special offers.

  • This field is for validation purposes and should be left unchanged.