Genesis has built-in column classes which we can use to arrange widget areas next to each other vertically in columns.
In this article I share code for registering multiple widget areas and displaying their content in various combinations (number and split ratio) of columns.
Note:
- In the sample code below genesis_after_header hook is used. You might want to replace it with one of the many Genesis hooks depending on where you want the columnized widget areas to appear.
- Also an if conditional is set to restrict the widget areas container to site's homepage/front page. You may want to adjust that depending on your design needs.
- Screenshots were taken with Genesis Sample as the active theme. Code may need minor adjustments in other child themes.
After adding the code, go to Appearance > Widgets and drag your desired widgets into the widget areas.
2-Columns 50% - 50%
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Thank you for this tutorial Sridhar!
I’m currently using Parallax Pro and I want to split the 5th home widget area into 2 columns, while still maintaining the styling.
I registered the code in Functions.php and front-page.php to make the 2 column widgets show up instead of the single column one, but when I did this I lost the styling.
All it shows up as is a white unstyled area. What should I do next to get the old 5th home widget background image and styling?
Remove (undo) the changes you have done in functions.php and front-page.php.
I am guessing you want to display social media icons at the left and a contact form on the right in .home-section-5?
I want to have a Recent Posts widget in the right and a Top Posts in the left.
This is what it looks like now:
http://screencast.com/t/dL4RSsUQ
The image is showing up weird and I can’t figure out how to center the widgets with better padding.
Sridhar
Thanks for this tutorial. I used 2-Columns 75% – 25% for my home page.
However, it is showing up in the same position on my domain.com/blog page as well. I thought this was for the home page only. Thanks!
Same with me, and I put my hook as genesis_after_entry so it would drop down below the home page’s title. But it does appear on my blog page as well.