Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding container to footer widget area
- This topic has 2 replies, 2 voices, and was last updated 9 years, 6 months ago by M1kaltoft.
-
AuthorPosts
-
September 9, 2014 at 4:49 pm #123656M1kaltoftMember
Hey,
I'm working with a child theme and I could use some help.
My theme does not come with a footer widget area to start, so I have added
add_theme_support( 'genesis-footer-widgets', 3 );
to the function.php file plus the default styling from the Genesis parent theme.
So far, so good. Everything works great. However, my theme is using a fullwidth layout, so the footer widget are close to the viewport side in both sides, I want to center it using Bootstraps "container" class.
What I would like to accomplish is to too add (see bold).
<div class="container">
<div class="footer-widgets"><div class="footer-widgets-1 widget-area"><section id="text-5" class="widget widget_text"><div class="widget-wrap"><h4 class="widget-title widgettitle">TITLE!</h4> <div class="text widget">Content</div> </div></section> </div><div class="footer-widgets-2 widget-area"><section id="text-4" class="widget widget_text"><div class="widget-wrap"><h4 class="widget-title widgettitle">TITLE!</h4> <div class="text widget">Contentl</div> </div></section> </div><div class="footer-widgets-3 widget-area"><section id="text-6" class="widget widget_text"><div class="widget-wrap"><h4 class="widget-title widgettitle">TITLE!</h4> <div class="text widget">Contentl</div> </div></section> </div></div>
</div>
How can I add the <div class="container"> to the beginning of the footer widget area and </div> to the end of the footer widget area.
I'm sure there is a hook available, however, I haven't been able to find it
Thanks a lot!
Sincerely,
MikaPs. I'm working localhost, so I can't leave a URL unfortunately.
September 10, 2014 at 2:12 am #123698CraigMemberWhile I can't help with adding Bootstrap's .container class, it is possible to add a Genesis .wrap class, which would essentially accomplish the same thing.
In your functions.php file, there should be a line like:
add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer' ) );
The footer widgets you have added may not be included by default, as like you said, they weren't in your theme originally. To add them, you would change it to look like:
add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );
Hope this helps.
September 10, 2014 at 10:19 am #123755M1kaltoftMemberHey Craig!
Thanks for your reply.Actually the structural wrap function loos like that:
add_theme_support( 'genesis-structural-wraps', array ('') );
When adding what you mentioned, absolutely nothing happened on the website, unfortunately.
There is no smart/easy way to add a <div> before the <div class="footer-widgets"> code starts and after it ends with </div>>
I really appreciate your time 🙂
Sincerely,
Mika -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.