Global _header.php

Hello theme.co team,

i had a problem that in some cases the child functionality to overwrite the _header.php (framework>legacy>cranium>headers>views) works, and sometimes not!!

Any suggestion why?

Hi There,

Thanks for writing in! Could you please try copying it to the following location and see if that helps.

/wp-content/themes/x-child/framework/views/global/_header.php

Hope that helps.

i’ve using pro-theme by the way not x, and there is no framework/views/global/_header.php in the parent pro theme folder

Hi there,

Pro also has the similar folder structure.

In your Pro child theme, you will need to created the directories.

/wp-content/themes/pro-child/framework/views/global/_header.php

Hope that helps.

Hi There Again,

I see the issue here. Only the Pro standard header applicable for _header.php which is under framework>legacy>cranium>headers>views.

For custom headers you can either try overriding masthead.php which is under \pro\framework\views\header\ OR _meta.php which is under ‘\pro\framework\views\global’.

Hope that helps.

No, i don’t want to change the masthead, i want to add some stuff in the global part of the site. And as i wrote in my question it already did work very well on the first website i wrote in the “secret note”. but on some other websites it didn’t take the child’s _header.php file!

But i found another file what worked for my second site, it’s in framework/views/header/base.php.

WHY it is now in base.php, and on the other site it is the cranium _header.php for the global part?
I run on both sites the pro theme and child???

Is it maybe that i’m using “icon” stack on the first site, and “renew” on the second website?

Hello There,

/wp-content/themes/pro-child/framework/views/header/base.php will work if you are using a custom header.

/wp-content/themes/pro-child/framework/legacy/cranium/headers/views/global/_header.php will work if you are not using a custom header and relies only on the default header.

You will have to edit both to make sure that you modification will work with or with out a custom header.

Hope this helps.

Now THAT is the answer i’m looking for. It’s true that i’m using the standard header on the first site, and a custom on the second. Now it makes sense for me.

Thanks again for your fast response, always a pleasure!

You are most welcome!

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