Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

hide sidebar (sidepanel) in maintenance mode

+2 votes
74 views
asked Sep 6, 2017 in Q2A Core by esqeudero
I notice that when I take my site into maintenance mode, the sidebar (sidepanel) still appears to users. This should be fixed in q2a 1.8.

How I can do it manually at the moment? Is there a quick way?
Q2A version: q2a 1.7.4

1 Answer

+2 votes
answered Sep 6, 2017 by pupi1985
selected Sep 6, 2017 by esqeudero
 
Best answer

In order to remove the whole side panel you need to add or merge (at the beginning of the function) this code into the sidepanel() function of your theme:

public function sidepanel() {
    if (qa_opt('site_maintenance')) {
        return;
    }

    parent::sidepanel();
}

In order to remove the side bar but keeping the side panel you can add or merge (at the beginning of the function) this code into the sidebar() function of your theme:

public function sidebar() {
    if (qa_opt('site_maintenance')) {
        return;
    }

    parent::sidebar();
}

commented Sep 6, 2017 by esqeudero
thank you it works
...