Home › Forums › Trusted Pro › Removing header image (and page title) on product archive pages. › Reply To: Removing header image (and page title) on product archive pages.
December 29, 2018 at 3:42 pm
#6420
Andy
Keymaster
By using the if (!is_woocommerce()){
conditional, you are saying that any page that does NOT use a WooCommerce template should follow this rule.
Replace your PHP code with this:
if ( is_product_category() || is_product_tag() ) {
trusted_custom_header_title( '27' );
} else {
if ( $trusted_custom_header ) {
trusted_custom_header_title( $trusted_this_id );
} else {
trusted_header_title();
}
}
This will run the empty custom header on all product category archive pages OR product tag archive pages.
Change the number ’27’ to an actual page ID of a page that is set to display an empty custom header, or create such a page specifically for this purpose. You won’t be showing this page on site, it is only for the purposes of using it’s page ID in this code.