Community Forums › Forums › Archived Forums › Design Tips and Tricks › Agency: Widget area or sidebar on front page
Tagged: add widget area, Agency, home slider
- This topic has 8 replies, 2 voices, and was last updated 11 years, 4 months ago by diegocerezo.
-
AuthorPosts
-
April 15, 2013 at 11:20 am #35582diegocerezoMember
Hello people from the studiopress community forum! hope you are all doing well
I need to add a sidebar to the front page of the Agency theme, I need it to expand all the way down right before the home middle widgets, I want all the middle and footer widgets to stay the same, so basically I need to add a widget area next to the home slider and the home slider to occupy less space to leave room for the widget and also to be a bit taller.
Here´s extra info so you understand what my needs are:
What I plan to do is have the sidebar contain a menu comprised of images linking to specific pages and the widget area containing the slider to contain the genesis responsive slider and a news widget underneath, since it works like a widget this should be simple enough.
I did a search on the forum to see if someone had done this already and I could´t find any post but if there is and any of you knows about it please point me in that direction so I don´t cause any troubles!
Thanks a lot!
April 15, 2013 at 3:22 pm #35629Brad DaltonParticipantApril 16, 2013 at 4:47 pm #35845diegocerezoMemberHello, here is the link http://www.fundaesq.org/
Rigth now is pretty much just the default agency install but with some changes on the aesthetics but only background and some PNG from the original theme, that´s all.
Thanks
April 16, 2013 at 4:54 pm #35847Brad DaltonParticipantInstall the Genesis Layout Extra's plugin and add a sidebar to your homepage.
You could also add a widget area to the homepage if you also want to display posts.
Change the hook if you want a sidebar next to the slider. http://genesistutorials.com/visual-hook-guide/
Like genesis_before_loop
April 16, 2013 at 9:50 pm #35880diegocerezoMemberFirst let me thank you for your help! I consider I have made some progress with the information you gave me.
Second I got a bit stuck, with your code i managed to add a widget area on the "genesis_before_content_sidebar_wrap" hook and it works fine, perfect actually, however I need it to be next to the slider, if you look carefully the slider is smaller, was 960px now is 650, I need the widget to be in the blank space now visible next to the slider, how do I do that?
Any further help will be greatly appreciated!
Diego
April 16, 2013 at 10:17 pm #35885Brad DaltonParticipantYou may be better adding the slider widget area in another hook location genesis_before_loop and then adding another widget area above the primary sidebar, genesis_before_sidebar_widget_area
genesis_before_loop
genesis_before_sidebar_widget_area
April 18, 2013 at 9:17 am #36149diegocerezoMemberOk, I did somewhat what you told me, I did not move the slider but just created a new widget area on the "genesis_before_loop" since the responsive slider is a widget I just added it to the widget and it shows exactly how I what it to show. On to the second issue, I registered a widget area on the "genesis_before_sidebar_widget_area" with this code:
<code>
genesis_register_sidebar( array(
'id' => 'genesis_before_sidebar_widget_area',
'name' => __( 'SideBar', 'eleven40' ),
'description' => __( 'This is the after header widget area.', 'eleven40' ),
) );add_action( 'genesis_before_sidebar_widget_area', 'wpsites_after_header_widgett', 8 );
function wpsites_after_header_widgett() {
if ( is_home() && is_active_sidebar( 'genesis_before_sidebar_widget_area' ) ) {
echo '<div class="home-slider">';
dynamic_sidebar( 'genesis_before_sidebar_widget_area' );
echo '</div><!-- end .genesis_before_sidebar_widget_area -->';
}}<code>
Just a mod of the code you gave me.
and the sidebar shows on the admin side but whenever I add something to it, it does not show on the site.
What´em I missing?
April 18, 2013 at 6:38 pm #36251Brad DaltonParticipantHello Diego
Tip: Be careful copying and pasting code as it can change what i call the apostrophies or what some people call qoutes, resulting in the code not working.
How to Post Code Snippets FAQ No. 5
Here's some new code i have written especifically for you:
This may not be the only solution for your needs.
The code you have modified above has an error which is the reason it didn't work properly.
The i.d for registering the widget is incorrect.
‘id’ => ‘genesis_before_sidebar_widget_area’,
Code not displaying? Grab it from Github https://gist.github.com/braddalton/5417272
Thanks for being patient Diego.
April 28, 2013 at 11:01 am #38234diegocerezoMemberSorry I took to long to answer, thanks for the tip I´ll try to take into account for future mods.
I could not get the second widget to even show I don´t know what I did wrong but it just does not show on the front side of the site, it shows on the back end perfectly but any widgets I add just don´t show. Anyway Exploring the links on your previos posts I found a plugin called "Layout Extras" or something of the like and that worked wonders, so in the end the solution that worked for me was somewhat of a hybrid i´m still using the first bit of code you gave me to add a widget and with the home sidebar activated via widget it ended looking 90% of what i had in mind and it works 100% for what I needed it for.
Thanks a lot, your help was very much welcomed!
Hope you have a great day!
check it out if you like!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.