Rearranging Widget Areas on Lifestyle Pro

Community Forums Forums General Discussion Rearranging Widget Areas on Lifestyle Pro

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  nutsandbolts 9 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #67191

    Erica Mueller
    Participant
    Post count: 17

    I want to have the two side-by-side widget areas at the top of the page and the full width widget areas below those. I thought if I want to front-page.php and just moved the code below like so it would work:

    
    function lifestyle_homepage_widgets() {
    
    		
    	if ( is_active_sidebar( 'home-bottom-left' ) || is_active_sidebar( 'home-bottom-right' ) ) {
    
    		echo '<div class="home-bottom">';
    
    		genesis_widget_area( 'home-bottom-left', array(
    			'before' => '<div class="home-bottom-left widget-area">',
    			'after'  => '</div>',
    		) );
    
    		genesis_widget_area( 'home-bottom-right', array(
    			'before' => '<div class="home-bottom-right widget-area">',
    			'after'  => '</div>',
    		) );
    
    		echo '</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>',
    	) );
    
    }
    

    As you can see here: http://www.ericamuellerdesigns.com/sandbox2/ that doesn’t work so great. It’s like the border for the full width widget area is starting above the split sections.

    Help!


    WordPress Manipulator

    http://www.ericamuellerdesigns.com/sandbox2/
    #67198

    nutsandbolts
    Moderator
    Post count: 3113

    I fought with this same thing last week – I ended up changing to a full width at the top, two sections in the middle, and one at the bottom. You could always try that and leave the top one empty… This also required a BUNCH of CSS and functions changes since I changed the name of the widget areas.

    function lifestyle_homepage_widgets() {
    
    		genesis_widget_area( 'home-top', array(
    		'before' => '<div class="home-top widget-area">',
    		'after'  => '</div>',
    	) );
    	
    	if ( is_active_sidebar( 'home-middle-left' ) || is_active_sidebar( 'home-middle-right' ) ) {
    
    		echo '<div class="home-middle">';
    
    		genesis_widget_area( 'home-middle-left', array(
    			'before' => '<div class="home-middle-left widget-area">',
    			'after'  => '</div>',
    		) );
    
    		genesis_widget_area( 'home-middle-right', array(
    			'before' => '<div class="home-middle-right widget-area">',
    			'after'  => '</div>',
    		) );
    
    		echo '</div>';
    	
    	}
    
    	        genesis_widget_area( 'home-bottom', array(
    		'before' => '<div class="home-bottom widget-area">',
    		'after'  => '</div>',
    	) );
    
    }

    I don’t know if that helps at all but I did finally manage to keep the full width section out of the split section that way.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #67201

    Erica Mueller
    Participant
    Post count: 17

    I wanted to test first and not change the names of any widgets…

    http://www.ericamuellerdesigns.com/sandbox2/

    Still doing it, even with code arranged like yours.


    WordPress Manipulator

    #67202

    nutsandbolts
    Moderator
    Post count: 3113

    I just remembered what I had to do to make it stop doing that… In your stylesheet, add a clear: both; to home-bottom if it isn’t there already. Once I did that, the overlap went away.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #67206

    Erica Mueller
    Participant
    Post count: 17

    YOU = AWESOME

    That did it! Yay. I can’t believe I’m doing all this just to create a mock-up to see if a client likes it.

    This is my first time with Lifestyle Pro. It’s beautiful but I’m having to learn a new theme.


    WordPress Manipulator

    #67207

    nutsandbolts
    Moderator
    Post count: 3113

    Woohoo!!!! I love those rare moments when my hours of suffering can help someone else. :)

    I did the same – it was just a mockup, and the client hated it and wanted to use a different child theme. Kind of infuriating but I guess that’s the way it goes sometimes.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.