Hi All
Built a simple Woocomerce site and am using ACF to add branding.
I am using the following filter to add a brand to the body class (see below)
function brand_class( $class ) {
if ( $branding = get_field( 'branding') ) {
$branding = esc_attr( trim( $branding ) );
$class[] = $branding;
}
return $class;
}
add_filter( 'body_class', 'brand_class' );
This filter is working perfectly for pages, posts and products BUT it’s doing something weird with product categories. It seems to only work for sub categories or 2nd level down categories, not first level categories.
Location Rule is set to: Taxonomy is equal to ALL
Has anyone experienced this issue?
Thanks for any help in advance
Anyone experienced this issue?