Community Forums › Forums › Archived Forums › General Discussion › Executive Pro – assign custom widget area to frontpage
Tagged: custom, frontpage, widget area
- This topic has 4 replies, 2 voices, and was last updated 11 years, 1 month ago by Brad Dalton.
-
AuthorPosts
-
October 19, 2013 at 1:02 pm #67695jhguynnMember
I figured out how to modify functions.php to register an additional widget area ('home_bottom') to be assigned to the frontpage, and I figured out how to edit frontpage to put it there. But I can't figure out how to change the number of widget items (i.e. columns) allowed in that area from 3 (the default) to 4. How do I do that?
October 19, 2013 at 1:07 pm #67697Brad DaltonParticipantOctober 19, 2013 at 1:31 pm #67701jhguynnMemberOkay, I think I answered my own question: I can assign a custom category or tag to the posts targeted to populate the slider, and sort them in the slider settings that way.
Still curious if there might be another, more ninja way to do than having a special category or tag floating around. Thanks for the feedback.
October 19, 2013 at 1:34 pm #67702jhguynnMemberHere is the code for the modified frontpage.php:
function executive_home_sections() {
genesis_widget_area( 'home-slider', array(
'before' => '<div class="home-slider widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-top', array(
'before' => '<div class="home-top widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-middle', array(
'before' => '<div class="home-middle widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-cta', array(
'before' => '<div class="home-cta widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-bottom', array(
'before' => '<div class="home-bottom widget-area">',
'after' => '</div>',
) );}
and here is the modified functions.php:
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => __( 'Home - Slider', 'executive' ),
'description' => __( 'This is the slider section on the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home - Top', 'executive' ),
'description' => __( 'This is the top section of the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-cta',
'name' => __( 'Home - Call To Action', 'executive' ),
'description' => __( 'This is the call to action section on the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-middle',
'name' => __( 'Home - Middle', 'executive' ),
'description' => __( 'This is the middle section of the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-bottom',
'name' => __( 'Home - Bottom', 'executive' ),
'description' => __( 'This is the bottom section of the home page.', 'executive' ),
) );Sorry, no link to offer. I'm developing this site offline.
October 20, 2013 at 12:10 am #67759Brad DaltonParticipantNot sure what CSS code you are using because i cannot access your site however you would use code like this http://wpsites.net/web-design/add-featured-widgets-inline-anywhere-in-genesis/
You can see the width in the CSS code is 25%.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.