I have created both a Maintenance and Coming Soon page. I created them as Templates in the Cwicly themer. I want to hide the menu and footer on those templates.
Of course for any admin account logged in I have set via Template conditions, that the maintenance page will be bypassed. I have my header and footer set in Fragments with conditions. But I see no way to target a custom Template (Maintenance & Coming Soon pages) to hide the Fragments.
Is there any way to hide the header and footer on Specific template pages with Fragments conditions? Or must I just create traditional pages instead?
I have tried targeting the ACF conditions but that caused a conflict.
Sorry to hear you’re experiencing trouble with this.
As suggested in my mail, be sure to set two conditions to both your header and footer:
- Do not show if > ACF > coming soon … > === > comingsoon
- Do not how if > User Role > equals > Administrator
Be sure to set Exclude Type to AND, to make sure both conditions are fulfilled for it to be true.
Please let me know if this helps, and don’t hesitate to let me know if you have any questions on this.
Hi @Araminta my conflict arises because I try to create an if statement for both a Maintenance & Coming Soon page. If I create condition for one of them, for example Coming Soon, it works as intended. But if I add a second condition as a separate condition for Maintenance it conflicts and nothing works. That was my issue. So I believe I can’t have both conditions at once, is my issue. Which makes sense if I was coding it out.
It seems like an AND/OR issue.
Do not display IF comingsoon OR maintenance AND Administrator
The visibility conditions only support AND or OR, not both within a single set and having multiple overriding sets as you have shown seems not to be working for you.
One potential solution is to reverse the condition. Instead of checking for comingsoon OR maintenance, you could check if that is any other value (e.g. if Coming Soon/Maintenance Options !== [empty]).
That way you can have a single set of visibility conditions.
Indeed, the conditions’ setup do need reworking, which we are aware of.
Thank you, @StrangeTech, for providing a temporary workaround to this!
Please bear with us @hopscotch until we have a fix to address this.
@Araminta I would suggest also that we could label and reorganise conditions. Also, in the conditions window it would be handy if it displayed the relevant Template Part you are working on to avoid confusion
Apologies @StrangeTech I was launching the site so I hadn’t time to respond. I was nearly there when I read your helpful post. The conditions are a bit finicky. I usually have to delete them and start over for them to ‘take’. But I have it now working.