Hello,
You have a couple of options, the easiest being to simply hide it via CSS:
.product-page-title {
display: none;
}
A better method would be to remove it via filter in your functions.php
add_filter('woocommerce_show_page_title',false);
Note that with either of these options, you’ll want to be using a Child theme so your changes don’t get overwritten: https://codex.wordpress.org/Child_Themes
Thread Starter
s7v7n
(@s7v7n)
cdcampbell26,
.product-page-title {
display: none;
}
the code worked perfectly 🙂 thank you so much!
there are no more page titles in shopping pages.
but in Blog page the title is still there¿
Yeah so what you’ll want to do is add the body class of only the page(s) you want the title to not show on, like this:
.post-type-archive-product .product-page-title {
display: none;
}
You can see this by opening the site in Chrome and looking in the code inspector.
Thread Starter
s7v7n
(@s7v7n)
i use mozilla and chrome; but i am not good at inspecting codes :/
btw the second code didn’t work
My website has double headers on each page. The first header is ok but the second header which generated by Woocommerce is hidden by CSS ‘display:none;’. I wanna remove the Woocommerce header but when I’ve tryed to insert your code:
add_filter(‘woocommerce_show_page_title’,false);
but this is calls an Error:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /web1/mcgtimber.co.uk/wp-includes/class-wp-hook.php on line 274
Try to find ‘h1’ in a code:
http://www.mcgtimber.co.uk/product/32mm-x-150mm-loglap-softwood-timber-cladding/
What did I do wrong?
Error is gone but add_filter doesn’t work. There are still two H1 tags on the page.
I’ve found a solution.
It is needed to remove one of actions which called in woocommerce/includes/wc-template-hooks.php.
I added this string in my Functions.php and double H1 was gone:
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );