Gday Enfold users
I’d like to remove the sidebar from search results page.
I am aware this can be done by modifying the header.php file ()https://kriesi.at/support/topic/how-to-remove-sidebar-on-search-result-page/, or even by using the CSS display none.
However, I’m keen to use my child theme function.php file instead, and am wondering if this is possible, and can anyone can help me achieve this.
cheers
Darryl
Hi itchybrain!
Thank you for coming back.
You have to open enfold\search.php (parent theme).
Look for (line 8):
get_header();
and replace with:
get_header();
do_action( 'ava_search_after_get_header' );
This will be implemented in the next update.
In functions.php of the child theme add:
add_action( 'ava_search_after_get_header', 'my_ava_search_after_get_header', 10 );
function my_ava_search_after_get_header()
{
global $avia_config;
$avia_config['layout']['current'] = $avia_config['layout']['fullsize'];
$avia_config['layout']['current']['main'] = 'fullsize';
}
Cheers!
Günter
Günter, you’re a legend! Thank you, very much appreciated. Works like a charm.
cheers
Darryl