Community Forums › Forums › Design Tips and Tricks › Adding widget area above both sidebars
Tagged: Sidebar
This topic contains 2 replies, has 2 voices, and was last updated by Au Coeur 5 months ago.
-
AuthorPosts
-
December 17, 2012 at 10:18 am #5752
RE: http://66.147.244.203/~nalunant/
I am trying to accomplish a three column layout option with an additional widget area spanning the top of the two sidebars (similar to this). Does anyone have any suggestions?
Here is what I have tried:
Added my additional widget area at the top of the sidebar div and called the secondary sidebar with “ add_action(‘genesis_after_sidebar_widget_area’, ‘genesis_sidebar_alt’);” However, I have discovered that calling the sidebar-alt output this way removes the layout functionality — genesis no longer recognizes if it should show one or both columns based upon the layout settings selected on the page.
And, on top of that, I have not been able to figure out how to remove the original sidebar-alt as
remove_action( ‘genesis_before_sidebar_alt_widget_area’ );
remove_action( ‘genesis_sidebar_alt’ );
remove_action( ‘genesis_after_sidebar_alt_widget_area’);did not work.
I would greatly appreciate any help accomplishing this. Thanks.
Mother. Web & Graphic Designer. Lactation Consultant. Blogging about how it all fits together 30 miles out to sea. Visit my blog or my design site.
December 17, 2012 at 1:58 pm #5799I think what I would do is choose a content-sidebar layout, then register additional sidebar areas UNDER the sidebar.
When I did this before, I added the following to functions.php:
// Add two sidebars underneath the primary sidebar
add_action('genesis_after_sidebar_widget_area', 'lifestyle_include_bottom_sidebars');
function lifestyle_include_bottom_sidebars() {
require(CHILD_DIR.'/sidebar-bottom.php');
}
Then I added a file titled sidebar-bottom.php to the theme files, with this as its content:<div id=”sidebar-bottom”>
<div id=”sidebar-bottom-left”>
</div><!– end #sidebar-bottom-left –><div id=”sidebar-bottom-right”>
</div><!– end #sidebar-bottom-right –></div><!– end #sidebar-bottom –>
I also registered the sidebar areas in functions.php but I think that duplicated the addition of the sidebar-bottom.php file.
genesis_register_sidebar(array(
‘name’=>’Sidebar Bottom Left’,
‘id’ => ‘sidebar-bottom-left’,
‘description’ => ‘This is the bottom left column in the sidebar.’,
‘before_title’=>’<h4 class=”widgettitle”>’,'after_title’=>’</h4>’
));
genesis_register_sidebar(array(
‘name’=>’Sidebar Bottom Right’,
‘id’ => ‘sidebar-bottom-right’,
‘description’ => ‘This is the bottom right column in the sidebar.’,
‘before_title’=>’<h4 class=”widgettitle”>’,'after_title’=>’</h4>’
));
So – I think there’s a simpler way to do it, but that worked for me on another site.
Web designer and avoider of chores.
Bringing websites Up to Speed! Follow me on Twitter!-
This reply was modified 5 months ago by
Dorian Speed.
-
This reply was modified 5 months ago by
Dorian Speed.
December 19, 2012 at 2:33 am #6118There is a simpler way to do it. I know how to add additional sidebars, but that’s not what I want to do because I want the client to have the ability to easily choose on a page by page or post by post basis whether or not to have the secondary sidebar to show up and which sidebar to display (using Genesis layout and sidebar selection in post/page). Hence, the second sidebar in this area needs to maintain all of the functionality of the sidebar-alt. I am hoping that there is a way to relocate the secondary sidebar rather than create a new one.
Mother. Web & Graphic Designer. Lactation Consultant. Blogging about how it all fits together 30 miles out to sea. Visit my blog or my design site.
-
This reply was modified 5 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.