How to add a DIV to footer-widgets in Agency theme

Community Forums Forums Design Tips and Tricks How to add a DIV to footer-widgets in Agency theme

This topic is: not resolved

This topic contains 7 replies, has 3 voices, and was last updated by  jodzeee 1 year, 5 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #36069

    jodzeee
    Participant
    Post count: 216

    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://
    #36072

    AC
    Blocked
    Post count: 7712

    The 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.,

    #36077

    jodzeee
    Participant
    Post count: 216

    I’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.

    #36111

    braddalton
    Participant
    Post count: 9953

    Add this to the end of your child themes functions.php file:

    Style using:
    [css]
    .before-footer {
    background: powderblue;
    }
    [/css]


    #36182

    jodzeee
    Participant
    Post count: 216

    Thanks 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.wrap

    Also, 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!

    • This reply was modified 1 year, 5 months ago by  jodzeee.
    • This reply was modified 1 year, 5 months ago by  jodzeee.
    #36204

    jodzeee
    Participant
    Post count: 216

    Is my code showing up?

    https://gist.github.com/jodzeee/5415479

    • This reply was modified 1 year, 5 months ago by  jodzeee.
    • This reply was modified 1 year, 5 months ago by  jodzeee.
    #36253

    braddalton
    Participant
    Post count: 9953

    You 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.


    #36317

    jodzeee
    Participant
    Post count: 216

    I’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.

    > screenshot

    Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.