brendan.wright Aug 29, 2016 · 9:42 am #4671 Hi,
I am looking for a way to show the content of a page without the header, footer and sidebar to deploy it in an app through a webview.
I created a new page template (full-width-no-title-no-menu) by copying the existing page template (full-width-no-title) and removing the “get_header();” line. However, the formatting is not great.
Has anyone done this and is there a simple way?
Cheers
Brendan
Andrew Misplon Puro Aug 29, 2016 · 10:42 am #4673 Hi Brendan
Removing the header is problematic because within the header file is wp_header through which lots of important scripts are outputted. The easiest would be to use CSS in a Custom CSS plugin like Simple Custom CSS or in your child theme style.css file.
If it’s the home page you’d say something like:
/* Home */
.home .site-header,
.home .site-footer {
display:none;
}
.home #page .site-content {
padding-top: 0;
padding-bottom: 0;
}
(If you’re modifying themes files at a code level, please, be sure to use a child theme).