Enterprise Pro – Adding a Widget Area Between Home Top and Home Bottom

Community Forums Forums Design Tips and Tricks Enterprise Pro – Adding a Widget Area Between Home Top and Home Bottom

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  AC 1 month, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #117369

    MarkAsacker
    Participant
    Post count: 14

    Hi,

    First, thanks for taking the time to read this.

    I’ve registered a new side bar “sub-footer” in enterprise pro (copied it from the outreach pro). I don’t actually want them to show up in the sub-footer section of the home page I just kept the IDs and everything the same for ease of copying over.

    I want them to show up between the Home Top and the Home Bottom widget areas.

    Under Appearance > Widgets it is ordered correctly (Home Top, sub footer left, sub footer right, Home Bottom) but on the home page it displays home top, home bottom, footer left, footer right…

    Does anyone know how to flip these? I must be missing something because I’ve done this type of thing many times before and can’t figure out why it’s not working now.

    Thanks advance for any help you can offer…

    Just FYI

    I’ve added support for the widget areas in the functions.php using this…

    
    //* Add the sub footer section
    add_action( 'genesis_after_content_sidebar_wrap', 'enterprise_sub_footer', 2 );
    function enterprise_sub_footer() {
    
    	if ( is_active_sidebar( 'sub-footer-left' ) || is_active_sidebar( 'sub-footer-right' ) ) {
    		echo '<div class="sub-footer"><div class="wrap">';
    		
    		   genesis_widget_area( 'sub-footer-left', array(
    		       'before' => '<div class="sub-footer-left">',
    		       'after'  => '</div>',
    		   ) );
    	
    		   genesis_widget_area( 'sub-footer-right', array(
    		       'before' => '<div class="sub-footer-right">',
    		       'after'  => '</div>',
    		   ) );
    	
    		echo '</div><!-- end .wrap --></div><!-- end .sub-footer -->';	
    	}
    	
    }
    

    Then I’ve added these arrays to the functions.php file between home top and home bottom

    genesis_register_sidebar( array(
    	'id'          => 'sub-footer-left',
    	'name'        => __( 'Sub Footer - Left', 'enterprise' ),
    	'description' => __( 'This is the left section of the sub footer.', 'enterprise' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'sub-footer-right',
    	'name'        => __( 'Sub Footer - Right', 'enterprise' ),
    	'description' => __( 'This is the right section of the sub footer.', 'enterprise' ),
    ) );

    Finally I’ve added these functions to the front-page.php file between home top and home bottom

    
    function enterprise_sub_footer_left_widgets() {
    
    	genesis_widget_area( 'sub-footer-left', array(
    		'before' => '<div class="sub-footer"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    	
    }
    
    function enterprise_sub_footer_right_widgets() {
    
    	genesis_widget_area( 'sub-footer-right', array(
    		'before' => '<div class="sub-footer"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    	
    }
    

    Am I way off? Easier way?

    http://www.jltaylorandassociates.com/new
    #117431

    AC
    Blocked
    Post count: 7712

    Instead of adding the area to the functions, open up the front-page.php and insert it where you want it.

    #117433

    AC
    Blocked
    Post count: 7712

    You don’t need to add them in there twice. Are you waiting two different widget areas – a left and a right or just one widget area?

    #117463

    MarkAsacker
    Participant
    Post count: 14

    Hi Anita,

    Thanks for the input.

    The way they did it in Outreach Pro was the way I copied it as above.

    It’s a sub-footer widget area with sub-footer-left and sub-footer-right within it.

    I have the widget area working the way I want (you can see the results guaranteed graphic is in sub-footer-left and the items they remove from the credit report are in sub footer right).

    My problem is that I need Sub-footer (which contains sub-footer-left and sub-footer-right) to come right after the Home Top widget area (where the testimonials sit now). Then I want the home bottom then footer widgets.

    Right now it’s home top, home bottom, sub-footer, footer.

    Does that make sense?

    Again thanks for the help.

    #117470

    AC
    Blocked
    Post count: 7712

    See here in your code:

    add_action( 'genesis_after_content_sidebar_wrap', 'enterprise_sub_footer', 2 );
    

    Change the 2 to 3. If that doesn’t work, change to 5. I am not good at the positioning of the numbers yet. If 5 doesn’t work, try 10.

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

You must be logged in to reply to this topic.