- This topic has 13 replies, 3 voices, and was last updated 1 year, 10 months ago by Tom.
May 27, 2019 at 9:30 am #912329Daniel
I’d like to show a footer widget on Front page only, so I don’t want to disable footer widgets. I would, however, like to remove the default footer widget instructions so they don’t appear on pages that don’t use footer widgets (single products/posts, archives, etc.). The text being utilized is in content/generatepress/inc/structure/footer.php. I tried using this same structure to copy this file to my child theme but was unsuccessful at getting it to respond. What is the structure needed for that file to respond in my child theme?
ThanksMay 27, 2019 at 9:32 am #912332LeoStaffCustomer Support
This can be done easily with Layout Element:
Let me know if this helps 🙂May 27, 2019 at 9:37 am #912339Daniel
I noticed you gave that answer on another support topic, so I tried it, but it does not allow removal of Footer widgets on individual pages, as far as I can tail. Is that right? I just want to remove the instructions that appear by default when a footer widget is not being used. I still need a footer widget to appear on the front page only. Does that make sense? See my website.May 27, 2019 at 9:49 am #912358LeoStaffCustomer Support
That is actually exactly what Layout Element is for.
So select 0 in the customizer:
Create a layout element and select 1 footer widget:
Then select Front Page under Location for display rules:
https://docs.generatepress.com/article/layout-element-overview/#display-rulesMay 27, 2019 at 10:20 am #912391Daniel
Thx, I will try that! However, could you also tell me how I would structure my folders if I still want to add this file to my child theme?May 27, 2019 at 10:28 am #912401LeoStaffCustomer SupportMay 27, 2019 at 10:31 am #912407Daniel
The footer.php file that I mentioned in my original question inside generatepress/inc/structures/May 27, 2019 at 10:33 am #912412LeoStaffCustomer SupportMay 27, 2019 at 11:40 am #912472Daniel
I’m curious how I would include that file in my child theme should I ever want to do that – no reason in particular.May 27, 2019 at 11:51 am #912481LeoStaffCustomer SupportMay 27, 2019 at 12:56 pm #912523Daniel
Except that conflicts with the regular footer.php file, so I can’t just put it into my child theme folder. There are (at least) two footer.php files in the generatepress parent theme. The one inside the inc/structures folders is what I want. I created that folder structure in my child theme and it didn’t work.May 27, 2019 at 2:52 pm #912599TomLead DeveloperLead Developer
We’ve actually removed the instructions from the footer widgets by default in 2.3: https://generatepress.com/generatepress-2-3/May 27, 2019 at 5:59 pm #912683Daniel
Ok, Tom, thanks. I will download it. Now, I don’t mean to be rude, but my question has still not been answered. Regardless of why I would want to do this, I would still like to know how I would overwrite the footer.php file from the parent theme that is in inc/structures/ by putting it in my child theme. Since there are more than one footer.php files in generatepress, it is important that I create the correct folder structure. I tried duplicating the parent theme structure, but that didn’t seem to work. What is the correct structure for putting that file into my child theme?
ThanksMay 28, 2019 at 8:20 am #913449TomLead DeveloperLead Developer
There isn’t a way to overwrite that file in your child theme.
Most things are filterable, though. So it’s likely possible to edit what you’re needing without overwriting a file. What exactly do you need to do?
- You must be logged in to reply to this topic.