Tagged: portfolio categories, sidebar, Sidebar Settings
Hi,
I wanted to remove the sidebar from portfolio category pages as they include a sidebar listing every page on the site which we don’t want visible. I saw from the Forum how to deactivate sidebar in Enfold Child/Sidebar Settings… however the sidebar then disappears from my Shop overview page which I didn’t want.
Any way I can fix this?
Tried another way first… I allocated all my site pages with customised sidebars thinking that any pages not allocated with a sidebar (such as the portfolio category pages) would get allocated the “displayed everywhere” sidebar by default… but experienced that both the customised AND the displayed everywhere sidebar was displayed on a page. So I figured the solution 1 was only option?
Hey AnnemarieDoolin,
Thank you for using Enfold.
Enable the sidebar for archive pages then add this in the functions.php file:
add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2);
function avia_change_post_layout($layout, $post_id) {
//var_dump($layout);
if(is_archive() && !is_post_type_archive('product'))
{
$layout['current'] = $layout["fullsize"];
$layout['current']['main'] = "fullsize";
}
return $layout;
}
Best regards,
Ismael
This is very interesting and good, but sadly i can not swith it for specific categorys :_(
has_term( 54 )
od is_category( 54 )
…
noting i tried is working
Hi!
Try it as
is_category(’54’)
and let us know if that solves your issue
Cheers!
Basilis
I tried before. sadly all this i tried wasn´t working.
I opened a new topic here:
Because it would be helpfull to have different colums as well.