Archived topic
Elements not hiding on certain pages and more
12 replies · Started by Mathijs Kooij on October 30, 2015
Thanks for looking into this. Support here is great. On my site (bestevaer.org) I only want to show the header on the frontpage and not on other pages. I want the pagetitel to never show. I can hide them on almost all the pages but on a few it doesn't work. This is on Woocommerce pages and on the blog page (nieuws). Also choosing content, no sidebar doesn't work
I skiped hiding the header on all pages so forget about that. Only the problem that hiding the page title does not work with woocommerce pages.
GP doesn't have any control over WC titles like we do our own titles, but you can remove them with some CSS like this:
.product_title {
display: none;
}
Disable Elements/Sidebar Layouts won't work on your blog index or main WooCommerce index because WP ignores metabox options for these pages.
This is why we have a Blog Layout option in the Customizer (Customize > Layout).
Let me know if you need more info :)
Thank you, but that only hides the title of a product on that page. I made a child theme and put the css there. The hiding of the product title works, but that is not what I need.
I tried (al optins also with the !important behind it):
.page_title {
display: none;
}
Also
.woocommerce. .page_title {
display: none;
}
.woocommerce-page .page_title {
display: none !important;
}
But all not working.
I figured it out,I added this to the functions.php template:
add_filter('woocommerce_show_page_title',false);
Of course in a child theme!
Nice solution! Thanks for sharing :)
I have a similar problem, not with the page title but with the header. I want to show the header on the blog but hide it on the woocommerce pages. I need some filter for my child theme functions.php but my knowledge of PHP is very limited unfortunately. Any help would be greatly appreciated!
Hi Tony,
The entire site header?
If so, you can hide it with this CSS:
.woocommerce .site-header {
display: none;
}
css doesn't work; I already tried:
.archive .site-header {
display: none;
}
hiding elements also doesn't work for the archive page. The only way to get rid of the header on the archive page is to hide it on the blog, but I want to keep it there.
.woocommerce .site-header {
display: none;
}
Doesn't work?
And:
.archive .site-header {
display: none;
}
Doesn't work for archives?
Can you link me to your site? Both of those should work just fine.
Hi Tom.
Sorry to have bothered you because it works now!
Must have been my cache or the plugins I removed today.
Thanks for your work!
Tony
Great! Most likely the cache :)
Glad I could help!
