Pro header not showing on index pages

Hi There,

I have a minor problem with my Pro headers.

At the moment I have 3 pro headers. One assigned global, One assigned to all pages and one assigned to all posts. However the global assigned pro header is not showing on the index-tag-archive pages.

Thx in advanced!

Grtz Marcus

Hi Marcus,

Unfortunately, I can’t access the URL you have shared. It says forbidden. Although, I double check it on my installation and it is working as expected. Can you redo the assigment of your header? In case you have caching, clear cache after before checking.

In case the issue persists, please check with your server provider on how we can access it. Then share credentials inside a secure so we can double check your setup. Thank you.

Hi Lely,

Thx for your reply. You can access the site now.

Unfortunately the header is still not showing up on index pages. There should be a white row underneath the black menu header with the category or tag name.

Hi Marcus,

Its the header that is set as All Berichten the archive pages (tags/categories) that going to use. Please edit that header instead.

Hope it helps,
Cheers!

Hi Friech, Thx for tour reply.

I understand but than that header also shows on the single post page. That is not what I want, thats why I created three different headers

I hope you can help me how to fix this. Thx!

Hi Marco,

In that case, please add this php code in your child theme’s functions.php


add_filter('cs_match_header_assignment', 'custom_search_header');
function custom_search_header($id) {
 
    if (is_tag()) {
        $id = 1224; // id of global header 
    }
    return $id;
}

So basically, what the code does is it overrides the header assignment if the page is a tag page. The id variable there is the id of your global header. To know what the id of your header is, you just have to edit that header then check the url, the number seen there will be the id of that particular header.

Hope it helps.

Hi Albrecht, Sorry, it’s still not working. :thinking:

Hi Marco,

That actually works, see the /tag/cloudflare/ page, please clear your browser’s cache.

If you need this to work on categories and tags, please update this line:

if (is_tag()) {

To this:

if (is_archive()) {

Hope it helps,
Cheers!

Hi Friech,

It’s working perfectly now! :grin:

Thx for the great support and great theme!

Have a nice day!

You’re must welcome, have a nice day too,

Cheers!

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