Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add widget area above Primary and alt sidebars
- This topic has 14 replies, 3 voices, and was last updated 10 years, 2 months ago by
soaringpine.
-
AuthorPosts
-
March 26, 2013 at 12:20 pm #31369
soaringpine
MemberI am using the Focus theme for my blog site, with the home page utilizing a 3 column layout (content, primary sidebar, alt sidebar). My inner pages are utilizing a content, primary sidebar layout.
What I would like to do is add a widget area above BOTH sidebars on the home page. I can add a widget using a hook but I cannot add it above BOTH sidebars. There is no hook that places it above both sidebars.
Can someone guide me in the right direction with this? I would greatly appreciate it.
March 26, 2013 at 12:48 pm #31376Brad Dalton
ParticipantMarch 26, 2013 at 1:37 pm #31389Susan
ModeratorMarch 26, 2013 at 8:51 pm #31446soaringpine
MemberMy site is http://www.hornsports.com. None of these solutions are working for me. No hook that will put a widget above both sidebars without covering both the content area and the sidebars.
Any ideas are appreciated.
March 27, 2013 at 1:37 am #31462Brad Dalton
ParticipantHow about this hook: genesis_before_content_sidebar_wrap
March 27, 2013 at 8:10 am #31508soaringpine
MemberThat hook places the widget above both the content column and both sidebars. Just need something to place above the sidebars.
Any other ideas?
March 27, 2013 at 8:18 am #31512Brad Dalton
ParticipantThis one but only for content sidebar layouts. genesis_before_sidebar_widget_area
I guess you already know that?
I'm sure there's a way to add custom hooks in Genesis.
March 27, 2013 at 8:32 am #31515Brad Dalton
ParticipantI think i found a hook already in the Genesis core sidebar-alt.php file.
Try these 2:
genesis_before_sidebar_alt_widget_area
genesis_before_sidebar_widget_area
Works?
March 27, 2013 at 8:36 am #31516soaringpine
MemberThis is what I currently use:
add_action( 'genesis_before_content_sidebar_wrap', 'child_before_sidebar_widget_area_ad_sidebar' );
/** Loads a new sidebar after the content */ function child_before_sidebar_widget_area_ad_sidebar () { echo '<div class="before-sidebars-area">';
dynamic_sidebar( 'before-sidebars-area' );
echo '</div>';
}
How would I utilize two hooks?
March 27, 2013 at 9:10 am #31526Brad Dalton
ParticipantI've written the code containing the new hook and will test it using the sidebar - content - sidebar layout.
March 27, 2013 at 9:21 am #31529soaringpine
MemberThanks Brad. Focus does offer the 3 column layout as an option (http://demo.studiopress.com/focus/layouts/css/). I am using content-sidebar-sidebar on my home page.
I appreciate your help with this.
Also checked out your site - nice work.
March 27, 2013 at 9:35 am #31534Brad Dalton
ParticipantMarch 27, 2013 at 9:58 am #31536soaringpine
MemberBrad, this adds two widget areas it looks like - one above each sidebar.
March 27, 2013 at 10:35 am #31544Brad Dalton
ParticipantJust use one and make the width extend across both using CSS code.
There is no hook that places it above both sidebars.
March 27, 2013 at 8:01 pm #31645soaringpine
MemberStill getting hidden behind one sidebar. Any other ideas?
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.