Thanks to support help, I successfully assigned custom headers to woocommerce category pages to my staging site: Pro Headers in Woocommerce Shop Category Pages by adding this snippet of php code to my pro child functions file:
add_filter('cs_match_header_assignment', 'custom_search_header');
function custom_search_header($match) {
if (is_product_category()) {
$match =7935; // the post ID for your header
}
return $match;
}
Success here:
https://vpzry3xn2p3.c.updraftclone.com/product-category/original-paintings/oil-paintings/
However, when I replicated this after installing pro on my site and downloading/installing all header templates (this is working beautifully so far), I did the same thing and making sure I am assigning the correct new header id (7916), it didn’t work.
add_filter('cs_match_header_assignment', 'custom_search_header');
function custom_search_header($match) {
if (is_product_category()) {
$match =7916; // the post ID for your header
}
return $match;
}
Fail: https://www.amytwon.com/product-category/original-paintings/oil-paintings/
Note that this page currently has a global header assigned because I can’t leave without header.
What am I doing wrong? Thanks!