Skip to content

Instantly share code, notes, and snippets.

@wpsmith
Forked from pdewouters/gist:4566151
Last active December 11, 2015 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpsmith/4566229 to your computer and use it in GitHub Desktop.
Save wpsmith/4566229 to your computer and use it in GitHub Desktop.
<?php
add_action( 'genesis_setup', 'ssm_theme_setup', 15 );
/**
* This function runs when the them is loaded and is responsible for running
* all the action and filter hook functions that customize the theme;
*/
function ssm_theme_setup() {
/** Run some code on the genesis before hook */
add_action( 'genesis_before', 'ssm_open_root_markup' );
// Move the footer outside wrap
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
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 );
// Customize the entire footer
add_action( 'wp_footer', 'genesis_footer_widget_areas', 2 );
add_action( 'wp_footer', 'ssm_close_root_markup', 2 );
add_action( 'wp_footer', 'genesis_footer_markup_open', 2 );
add_action( 'wp_footer', 'ssm_do_custom_footer', 2 );
add_action( 'wp_footer', 'genesis_footer_markup_close', 2 );
}
@pdewouters
Copy link

it's actually not possible to do this with hooks as the genesis_after hook comes after wp_footer in the markup. I think the only way to do it is to create a custom footer.php in the child theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment