-
Author
-
May 5, 2018 at 12:38 #196880banana7777Participant
Hi,
I like to hide the sidebar just on the search result page. How can I achive this?
Thanks and best regards,
Dirk
May 5, 2018 at 17:12 #196896Kieran_SQModeratorHi,
Please try the below custom CSS in your KLEO Child theme to remove the sidebar on the search results page and make the content full width.
COPY CODE.search-results .sidebar { display: none !important; } .search-results .template-page.col-sm-9.col-sm-push-3 { width: 100%; left: 0; border-left: 0; }
Make sure to purge your website cache, autoptimize, CDN and front-end cache to see the changes.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
May 5, 2018 at 17:14 #196897banana7777ParticipantThis is a bad solution to hide via CSS. Do you have a hook to look at?
Thanks,
DirkMay 5, 2018 at 17:21 #196899Kieran_SQModeratorHi,
I cannot see if you have applied the CSS that I have provided or not because you’re using Autoptimize. I have cleared my cache but I do not see any changes.
In what way is this a bad solution for CSS? If you would prefer to make changes to theme files instead of using CSS please copy the search.php file from the main theme into your KLEO Child theme and make any desired PHP changes.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
May 5, 2018 at 17:35 #196901banana7777ParticipantI have not applied this to the site as this is not a good solution for my point of view. You are generating things that you in a second step hide for ever? Not good solution.
I will dig into the code by myself. Thought I would get here an indication in what direction I have to look. But okay.
Best,
DirkMay 5, 2018 at 17:54 #196907Kieran_SQModeratorHi Dirk,
I see and that’s a fair point, the best place to start is as above in the search.php file (once copied to the KLEO Child theme). I will refer this ticket to one of our developers for review and to potentially offer a more dynamic solution to removing the sidebar on search pages.
They’ll be in touch with you as soon as they can, Monday to Friday, East European Time.
Thank you for your patience,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
May 5, 2018 at 19:32 #196923banana7777ParticipantThat’s great. Thanks.
In the meantime I added this one to my functions.php (not live site). Is it okay to call from kleo_before_main?:
COPY CODEadd_action('kleo_before_main','distillery_switch_layout',10); function distillery_switch_layout() { if (is_search()){ kleo_switch_layout('full'); } }
May 5, 2018 at 19:40 #196928Kieran_SQModeratorHi,
Absolutely, I tested your code locally and it works nicely.
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
May 7, 2018 at 15:22 #197001RaduModeratorYes it’s ok
Let me know
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMay 7, 2018 at 18:10 #197031banana7777ParticipantThanks for letting me know. Just wanted to know if there might be some side effects.
May 7, 2018 at 18:42 #197036RaduModeratorNo problem
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Plugins questions’ is closed to new topics and replies.