Assigning Pro Theme Headers to Specific Product Category Pages

I just bought another license to use Pro Theme on a new project, and I need to be able to assign specific headers to Product Category (archive) pages.

How do I do this?

I see in the forum that users have been requesting this functionality since 2017 and it’s still not available.

Can this be done in the child theme functions page? If so, how?

Please advise.

It’s really aggravating. I love Pro theme, but it’s ridiculous that archive assignments for headers and footers are not available… STILL.

The whole point of Pro theme is to be able to control things on a micro level… and yet, this is a huge issue.

Hello Michael,

Thanks for writing in! With the current release update, you still cannot assign a specific to a category page/s. This is already in development as we speak though. Rest assured that our developers are working on this slated to be release along with the content builder. For the mean time, you can assign specific header to your category pages/s by using this custom PHP function.

Take a look at following tutorial for some help.

Please note that the article explains the concepts using Search page but the fundamentals remains the same. You can use conditional tags to assign a specific custom header to your category page/s.

Thank you for your understanding.

Okay. So I’ve tried to replicate the idea based on those examples to make the header I want to appear on the product tag archive page only… it is sort of working, but I think I’m missing some specificity that I don’t know how to add.

The tag archive id is 35. I tried both the number and the tag name.

I just want this one header (id 5536) to appear on just one page… the product tags archive page for ‘mint-collection’.

Based on the examples given, I’ve used this in the functions page:

add_filter(‘cs_match_header_assignment’, ‘custom_search_header’);
function custom_search_header($match) {
if (is_archive( ‘mint-collection’ )) {
$match = 5536; // the post ID for your header
}
return $match;
}

The problem is, it now seems to be showing on ALL archive pages, even the frontpage which has its own header already assigned.

It does not show on the individual Mint Collection product pages which have a special header assigned to them, so that part is working. I don’t want to use the “is_tag” because that would make it appear on the individual product pages and I don’t want that… so the “is_archive” is really the only choice… unless I’m wrong.

Am I missing some extra conditional identifier?

What exactly do I use to get it to behave the way I need it work?

I’ve tried to figure this out myself. I know it should be simple, but I’m clearly missing something. :confused:

Please help. Thanks!

OK… nevermind.

I just figured it out.

The product tag archive conditional is “is_product_tag” because it is a woocommerce conditional tag, which were not included in the samples in those other pages because that was just for wordpress.

So, figured it out. Hopefully this may help someone else!

Glad to hear you got it sorted, Michael and thanks for sharing how you solved it.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.