Hello guys !
I’ve developped a theme from Underscores so that I’m able to have just all I need.
But cannot have an empty page to allow BB working.
Which solution would be the best to deliver an “empty” page (no header, no sidbar neither footer) to plenty allow BB working and creating all the configuration you want depending on BB solution and just it ?
For e.g, to create a customized homepage.
Thanks for your help !!
Here is the test (but doesn’t work)…
Thanks for getting in touch! The way BB does it is via filters. Our theme contains filters on the header and footer elements(logo, top menu, header menu, footer widgets, credits and copyright) and by simply setting them to false, the theme won’t load them. That’s how our No Header/Footer template works.
Getting rid of get_header and get_footer won’t work since those files contain parts of the markup. Doing so would cause a lot of unclosed tags resulting in a broken layout. They also contain essential WP hooks(wp_head and wp_footer) which are used by most themes and plugins.
I guess the only way for you to achieve what you want is to create another header-.php and footer-.php files. And in these files, remove the elements you don’t want on your template, i.e., logo, navigation, footer widgets, footer credits and whatnot.
Hope this helps!
Thanks a lot for this way to do it.
It works perfectly
Whaou, a good job underscores (os it’s clear, empty and strong with bad code) and Beaver…
Just another question on the same subject (finding in Codex)
What about declaring s.thing like this (to allow customization too) :
if ( is_home() ) :
get_header( ‘home’ );
elseif ( is_404() ) :
get_header( ‘404’ );
Have a nice day Ben !
No worries! Not really sure I get your question? Could you elaborate? That code looks perfect though.
It’s to complete or add another solution and asking you if it could work too by using a conditional if page_template is blablabla in functions.php file.
Nevermind, your solution seems to be the best according to customisation…
have a nice day !
Gotcha! You can actually use that inside a page template and it should work just as fine. Enjoy The Beaver!