Skip to content

Snippet: Conditionally Show/Hide Footer Widgets

add_action( 'totaltheme/footer/is_enabled', function( $bool ) {

	// Hide for all blog related queries and single posts
	if ( is_singular( 'post') || wpex_is_blog_query() ) {
		$bool = false;
	}

	// Return boolean
	return $bool;

} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top