Tagged: No Sidebar
Dear all,
we would like zu remove the sidebar from search results page. Is it possible?
Or as an alternative: Is it possible to remove Pages overview from the sidebar of the search result page?
Thanks for your support and best regards
Christina
Hey Christina,
You can try using this plugin – https://wordpress.org/plugins/widget-logic/ and use
!is_search()
Cheers!
Yigit
Dear Yigit,
thanks a lot for your support.
So the code you mentioned is a modification of functions.php?
Hey!
No, when you install Widget Logic plugin, you will see a field where you can insert that logical condition not to display chosen widgets on search page :)
Cheers!
Yigit
Oh sorry, I now had a closer look at the plugin :).
Sorry, I think I need some extra help.
I added the plugin (widget logic), but I need to drag the “pages” widget somewhere first to modify the widget’s appearance. But I never created a sidebar for “search”.
How do I manage that? Or might it be easer not to display any sidebar (what I would prefer).
Thanks again for your support.
Hi,
You can simply add your widgets to “Displayed everywhere” widget area and then add that logic. However, if you would like to simply remove sidebar from search page, please add following code to Quick CSS in Enfold theme options under General Styling tab
.search .content {
width: 100%!important;
border: none!important;
}
.search .sidebar {
display: none!important;
}
Best regards,
Yigit
Brilliant, the CSS worked fine. Thanks a lot.