Community Forums › Forums › Archived Forums › Design Tips and Tricks › full width home-top in lifestyle pro theme
- This topic has 7 replies, 2 voices, and was last updated 10 years, 5 months ago by lauren.
-
AuthorPosts
-
October 30, 2013 at 8:15 am #69890laurenMember
I want my home-top widget to be full width, and then have the home-middle and primary sidebar begin underneath the full-width home-top.
Any ideas?
http://www.santaclaradesign.comOctober 30, 2013 at 12:15 pm #69946nutsandboltsMemberIt would probably be easier to add a whole new widget area since you want it to be above the content-sidebar wrap. You can do this by adding something like this to functions.php:
// Add a full-width widget area after the navigation bar add_action( 'genesis_after_header', 'nabm_full_width_area' ); function nabm_full_width_area() { genesis_widget_area( 'very-top', array( 'before' => '<div id="very-top">', 'after' => '</div>', ) ); } // Register Very Top Widget Area genesis_register_sidebar( array( 'id' => 'very-top', 'name' => __( 'Very Top', 'nabm' ), 'description' => __( 'This is the full width section below the navigation.', 'nabm' ), ) );
Then give it some CSS so it doesn't look weird by adding this to your stylesheet (you may want to add some rules of your own for link colors, font sizes, etc.):
/* Very Top ------------------------------------------------------------ */ #very-top { padding: 20px; text-align:center; }
Hope that helps!
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+October 30, 2013 at 12:58 pm #69957laurenMemberThank you so much for your help! I added in your code and got the white screen of death. All rehabbed now, and I'm wondering if you can help show me where to put it exactly. Thanks again!!
Here's my code:
<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Set Localization (do not remove) //* Child theme (do not remove) define( 'CHILD_THEME_NAME', __( 'Lifestyle Pro Theme', 'lifestyle' ) ); define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/lifestyle/' ); define( 'CHILD_THEME_VERSION', '3.0.0' ); //* Add HTML5 markup structure add_theme_support( 'html5' ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Enqueue Droid Sans and Roboto Slab Google fonts add_action( 'wp_enqueue_scripts', 'lifestyle_google_fonts' ); function lifestyle_google_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Droid+Sans:400,700|Roboto+Slab:400,300,700', array(), CHILD_THEME_VERSION ); } //* Add new image sizes add_image_size( 'home-large', 634, 360, TRUE ); add_image_size( 'home-small', 266, 160, TRUE ); //* Add support for custom background add_theme_support( 'custom-background', array( 'default-image' => get_stylesheet_directory_uri() . '/images/bg.png', 'default-color' => 'efefe9', ) ); //* Add support for custom header add_theme_support( 'custom-header', array( 'header_image' => '', 'header-selector' => '.site-title a', 'header-text' => false, 'height' => 110, 'width' => 320, ) ); //* Add support for additional color style options add_theme_support( 'genesis-style-selector', array( 'lifestyle-pro-blue' => __( 'Lifestyle Pro Blue', 'lifestyle' ), 'lifestyle-pro-green' => __( 'Lifestyle Pro Green', 'lifestyle' ), 'lifestyle-pro-mustard' => __( 'Lifestyle Pro Mustard', 'lifestyle' ), 'lifestyle-pro-purple' => __( 'Lifestyle Pro Purple', 'lifestyle' ), 'lifestyle-pro-red' => __( 'Lifestyle Pro Red', 'lifestyle' ), ) ); //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); //* Reposition the primary navigation remove_action( 'genesis_after_header', 'genesis_do_nav' ); add_action( 'genesis_before_header', 'genesis_do_nav' ); //* Modify the size of the Gravatar in the author box add_filter( 'genesis_author_box_gravatar_size', 'lifestyle_author_box_gravatar' ); function lifestyle_author_box_gravatar( $size ) { return 96; } //* Modify the size of the Gravatar in the entry comments add_filter( 'genesis_comment_list_args', 'lifestyle_comments_gravatar' ); function lifestyle_comments_gravatar( $args ) { $args['avatar_size'] = 60; return $args; } //* Register widget areas genesis_register_sidebar( array( 'id' => 'home-top', 'name' => __( 'Home - Top', 'lifestyle' ), 'description' => __( 'This is the top section of the homepage.', 'lifestyle' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle', 'name' => __( 'Home - Middle', 'lifestyle' ), 'description' => __( 'This is the middle section of the homepage.', 'lifestyle' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom-left', 'name' => __( 'Home - Bottom Left', 'lifestyle' ), 'description' => __( 'This is the bottom left section of the homepage.', 'lifestyle' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom-right', 'name' => __( 'Home - Bottom Right', 'lifestyle' ), 'description' => __( 'This is the bottom right section of the homepage.', 'lifestyle' ), ) );
October 30, 2013 at 1:00 pm #69959nutsandboltsMemberOkay, the first section I posted above should go in functions.php - I would put it right before the //* Register Widget Areas part toward the bottom.
The second section needs to go in style.css, not the functions file.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+October 30, 2013 at 1:07 pm #69961laurenMemberThis reply has been marked as private.October 31, 2013 at 11:26 am #70143laurenMemberI got it! I was copying the code out of my email, and it was messed up. Copied it from above and worked fine. Thank you Andrea!!
October 31, 2013 at 11:26 am #70144nutsandboltsMemberWoohoo! So glad it's working for you. If you don't mind, can you mark this topic as resolved? That way we'll know you found a solution.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+October 31, 2013 at 11:33 am #70148laurenMembersure!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.