Site logo

Archived topic

Using child-theme on a file in the "generatepress/inc/structure" folder

5 replies · Started by sharcs on June 6, 2020

Viewing posts 1–6 of 6

Hi,

I'm trying to add a new widget area next to the logo on the header. To do this, I'm editing the header.php file located on the generatepress\inc\structure folder.

The issue that I'm having is I have no idea on how to get this file working on the child theme. I can edit it on the parent theme no problem, but when I create a similar folder structure for it on my child theme, it just doesn't work.

So my question, how do I get this file to work on my child theme?

Thank you.

Hi there,

By default WordPress only allows the top level files to be overwritten.

We should be able to use the default header widget area and some CSS to re-position the widget instead of creating a new widget area though:
https://docs.generatepress.com/article/header-widget/

Thanks for the reply.

Could you please tell where to put the new widget code on the main header file?

Usually I just paste the code on where I want the widget to appear, but the only place to paste the code on the main header file is either before the secondary or after the primary navigation. Everything inside the header is controlled by the other header file in the "generatepress/inc/structure” folder that I mentioned earlier.

I'm sorry but I'm not very good at PHP, but if you give me the code and tell me where to paste it, I can figure the rest out myself.

Thank you

Oh wow, this is embarrassing. I've built like 5 sites on this theme and never noticed that there's a header widget.

For what it's worth, thank you for pointing it out and my apologies for wasting your time with my stupidity.

Thanks.

No problem :)

This archived topic is closed to new replies.