mpdesigner11
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Conditional Header on Single Product PageSOLUTION:
This function wasn’t working in Functions.php – because of the theme’s custom Single-Product.php implementation.
I replaced get_header ( ‘shop’ ) in single-product.php with:
if ( is_product() ) {
if ( has_term( ‘bracelets’, ‘product_cat’ ) ) {
get_header(‘project’);
} elseif ( has_term( ‘jewelry’, ‘product_cat’ ) ) {
get_header(‘project’);
} elseif ( has_term( ‘cards’, ‘product_cat’ ) ) {
get_header(‘company’);
} elseif ( has_term( ‘t-shirts’, ‘product_cat’ ) ) {
get_header(‘company’);
}
}Forum: Plugins
In reply to: [WooCommerce] Conditional Header on Single Product PageFantastic, thank you @jessepearson
Forum: Plugins
In reply to: [WooCommerce] Conditional Header on Single Product PageThanks @jessepearson – appreciate the feedback!
Just a quick follow up, where would I put that code? Function.php? Single-Product?
Cheers,
mpForum: Plugins
In reply to: [WooCommerce] Conditional Header on Single Product PageHi ryanr14,
Thanks for the response! At this point it’s just a logo change. My client has two separate product categories and they’d like to brand them differently. I was able to create a separate header for one of the brands and reference it (header-project.php) and have created another header (header-company.php), but just need some guidance on how and where to put the conditional statement based on product type?
Cheers,
mp 🙂