Remove header and footer from Password Template - help!

I’ve set password protection on the website (bricks 2.0+). I then created a template of type “password protection”. The functionality works well, however I can’t for the life of me figure out how to disable the header and footer on this template page. I’ve checked the template condition settings (can’t exclude a template). I’ve tried to manually hide with CSS code but thats not working either. Any tips? Thank you

.bricks-template-23 header,
.bricks-template-23 footer {
display: none !important;
}

https://thetruthnash.wpenginepowered.com/

Hey, I don’t quite understand exactly what you’ve done.

For example, you can exclude the header and footer if your template is rendering on a page. To do this, go into the Header or Footer, then in Template Condition Settings → Individuals, select your rendering page and make sure to toggle the Exclude button.

If it’s a post type, use the same approach: Condition Settings → Post Type → select the post types you want to hide.

As an alternative, here’s some CSS advice:

Right-click on the frontend and choose Inspect. Then look for the <body> tag in the DOM and check its body classes. After that, you can target it like this:

/* page-id-20 is just an example — replace it with the body class that fits your case */
body.page-id-20 header,
body.page-id-20 footer {
  display: none;
}

Thanks for the reply!

The solution ended up being even more simple than expected. I just created a custom code block in the template itself and set the css for header, footer display:none.

1 Like