Home › Forums › WoodMart support forum › different header for different parent categories › Reply To: different header for different parent categories
April 20, 2021 at 10:19 pm
#284821
Elise Noromit
Member
Hello,
Sorry, try this one:
add_filter(
'wd_get_current_header_id',
function ( $id ) {
if ( is_product_category() && is_object( get_queried_object() ) ) {
if ( get_queried_object()->term_id == 10 ) {
return 'header_576762';
} elseif ( get_queried_object()->term_id == 11 ) {
return 'header_496420';
}
}
return $id;
}
);
Let me know if does not work, we have recently changed the theme code considerably, there may be issues. We will give the valid one.
Best Regards