Child theme custom header.php not working

[ad_1]

ying

(@yingscarlett)

Hi @ulrichnielsen ,

Make sure the header.php you copied is from GP’s root folder, not the one from inc/structure.

Hi @yingscarlett , thanks but it just has hooks and I’d like to access the .inside-header div, which doesn’t seem possible through the header.php in the GP root folder.

Hi @ulrichnielsen,

You can unhook the generate_construct_header function through a code like this: https://docs.generatepress.com/article/generate_header/

Then, you can hook your own header code in generate_header.

This way, you shouldn’t need to create your own template file.

If you get GP Premium, there’s an easier way.

Hi @fernandoazarcon2 , thanks much, I’ll give it a try. I do have the GP premium plugin but I’m not using the block editor, in fact I’ve disabled it to remove excess js/css. I prefer doing everything manually.

I see. If that’s the case, you’ll need to create you own action hook to add your own HTML.

Thanks for all the help, I’ll figure it out. I’ll need to read up on it.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer