Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to add a DIV to footer-widgets in Agency theme
- This topic has 7 replies, 3 voices, and was last updated 11 years, 8 months ago by jodzeee.
-
AuthorPosts
-
April 17, 2013 at 10:00 pm #36069jodzeeeMember
Short story - I want to add some content above the three widgets in the footer in the Agency theme.
I'm using two of the widgets to show custom menus, but I want to have a heading that spans above them both. Is there a way to ad a div above those two widgets that spans 2 columns (or the whole width would be fine).
Thanks!
http://April 17, 2013 at 10:06 pm #36072AnitaCKeymasterThe problem you may have is keeping the responsiveness with the theme. You can add a div with a class in the home.php probably, then style the div adding a width, etc.,
Need help with customization or troubleshooting? Reach out to me.
April 17, 2013 at 10:45 pm #36077jodzeeeMemberI've experimented with adding divs in home.php, but I don't know where to add it to make it show up in the footer - I don't see anything about the footer area in home.php. (I don't know how to write PHP, but I'm comfortable making adjustments to it, with help ... I'm learning more every day!).
I appreciate your help.
April 18, 2013 at 4:50 am #36111Brad DaltonParticipantAdd this to the end of your child themes functions.php file:
Style using:
.before-footer { background: powderblue; }
April 18, 2013 at 12:45 pm #36182jodzeeeMemberThanks Brad, but that's not quite where I want it. I guess I shouldn't have said "footer". It's the footer widget area above that.
I think where it needs to be is inside div.wrap above div.footer-widgets-1
Or maybe it's even above div.wrapAlso, since I'm pretty new to this ... when do you add things like this to functions.php versus editing home.php (or others)?
Thank you!
April 18, 2013 at 1:18 pm #36204jodzeeeMemberIs my code showing up?
April 18, 2013 at 6:47 pm #36253Brad DaltonParticipantYou can simply change the hook http://genesistutorials.com/visual-hook-guide/
The code i provided displays code before you footer widgets.
You can easily add another widget area before your footer widgets or any of hook location once you clarify exactly which location that is.
Different people use different methods.
Personally i prefer using the child themes functions.php for all customization otherwise i would create a new custom template rather than edit default template files even in the child theme.
April 18, 2013 at 11:09 pm #36317jodzeeeMemberI've tried the various hooks and can't seem to get it in the right place. In the Agency theme, the footer widgets are set up as 3 columns below the end of #inner and before #footer. The footer contains the "return to top" and the copyright and whatnot.
The "genesis_before_footer" hook is showing up between the footer widgets and the footer. Does that make sense? I can't seem to figure out how to add anything to the footer widgets. When I add it to the next one up on the visual hook guide you provided, it shows up inside the #inner div.
One way I got to work is to add support for 6 footer widgets instead of 3 and style them so the layout works for what I want. I feel like this is a hack though. But then again, it will allow for editing via the widgets later I suppose. Is this the way I should be doing it? See screen shot.
Thank you!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.