This topic has 7 replies, 2 voices, and was last updated 2 years, 4 months ago ago by Awais Ahmed
I would like to integrate some of my website pages onto a mobile app and for this, i would like to turn off the header and footer on these selected pages.
I already figured out how to turn off the footer on selected pages, but i can’t seem to hide the header.
Please help!
Hello, @Azager,
Thanks For using our Theme.
Actually, You have to do this with the help of custom CSS but for this, you have to pick the classes of the pages and header then combine the classes and set the “display: none !important;”
Now, the thing is how can you get the classes to let me explain to you. first of all, we need to get the page id on every page by default WordPress shows the page id and it is unique from every page you can find the page id on the “
” tag via console log see this image: https://postimg.cc/mzSWBS5MSecond, now we need to find the header class the class of header is the “site-header” so now we have the both classes page and header now let’s combine and set the code to display none. The code will be like I write below.
.page-id-11 .site-header{display:none !important
;}
See this is the code now add this CSS code in the XStore >> Theme Options >> Theme Custom CSS then save settings and check back to your site after clearing the browser cache.
I hope you understand.
Regards 8Themes Team.
I will try this now
I cannot get it to work.
.page-id-11 .site-header{display:none !important
Instead of hiding the already existing heade, the above code adds another header. This time it adds a mobile view header. I want to hide the header and footer so that i can retain only the body of the page.
Hello, @Azager,
sorry for the inconvenience the code was wrong. Below is the working code you can use to solve your issue. Here is the result image for a better reference: https://postimg.cc/HV83M9wC, as you can see in the image the code works, and the header is gone.
.page-id-11 .site-header{display:none !important;}
Regards 8Themes Team.
Perfect! It works.
Thanks alot!
Most Welcome ?
If you do not mind, can you please leave 5 stars rating for our Theme & Customer and Technical Support by going here: http://themeforest.net/downloads It will allow us to release more updates and provide dedicated support in the future. It would encourage our work a lot. If you like our Theme and Support.
Thanks for contacting us.
Have a great day ?
If you will have any issues, you can contact us anytime, we are always here to help you.
Case Closed.
Tagged: header, selected pages, templates, turn off, woocommerce, wordpress
The issue related to '‘Can I turn off the header on selected pages?’' has been successfully resolved, and the topic is now closed for further responses