In my Facebook group a user asks:
Do you have a tutorial for removing the footer widgets from a couple of pages on a site (using Genesis, of course!)
Now I do.
The following sample code, when added to child theme’s functions.php will remove footer widgets on ‘About’ and ‘Contact’ Pages in a Genesis site:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove Footer Widget Areas on 'About' and 'Contact' Pages | |
add_action( 'genesis_after_content_sidebar_wrap', 'sk_footer_widget_areas' ); | |
function sk_footer_widget_areas() { | |
if ( is_page( array( 'about', 'contact' ) ) ) { | |
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
} | |
} |
Reference: https://codex.wordpress.org/Function_Reference/is_page#Examples