skip to Main Content

Remove Search Results Sidebar

// Remove Search Results Sidebar
function remove_search_sidebar( $layout ) {
	if ( is_search() ) {
		$layout = 'full-width';
	}
	return $layout;
}
add_filter( 'wpex_post_layout_class', 'remove_search_sidebar', 20 );
All PHP snippets should be added via child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)
Back To Top