Executive – move CTA above home-slider

Community Forums Forums General Discussion Executive – move CTA above home-slider

This topic is: not resolved

This topic contains 8 replies, has 2 voices, and was last updated by  lvdesign 1 year, 2 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #61308

    lvdesign
    Participant
    Post count: 4

    On the Executive theme homepage, I need to move the CTA widget ABOVE the Slider. When I edit home.php … If i move the PHP code for the function calling the widget area for ‘home-cta’ a few lines above the function calling the widget area for ‘home-slider’ … and then reload the site … BOTH the slider and the CTA disappear and I see a large white area on the site.

    I tested moving other widget areas around by moving the PHP code above or below each other. And this works fine moving other widget areas around (i.e., moving the ‘slider’ below the ‘home-top’ widget). But ONLY when I move the CTA above the slider, they both disappear and I get the white area.

    How can I get the CTA above the slider? Thank you!

    PHP code snippet from home.php:

    function executive_home_sections() {
    
    	if ( is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-middle' ) ) {
    		
    		genesis_widget_area( 'home-slider', array(
    			'before' => '<div class="home-slider widget-area">',
    		) );
    
    		genesis_widget_area( 'home-top', array(
    			'before' => '<div class="home-top widget-area">',
    		) );
    
    		genesis_widget_area( 'home-cta', array(
    			'before' => '<div class="home-cta widget-area">',
    		) );
    
    		genesis_widget_area( 'home-middle', array(
    			'before' => '<div class="home-middle widget-area">',
    		) );
    		   
    	}
    http://vincenti.com/newsite/
    #61309

    braddalton
    Participant
    Post count: 10587

    Change all instances of home-cta to home-slider and all instances of home-slider to home-cta in your home.php file.


    #61506

    lvdesign
    Participant
    Post count: 4

    Hi Brad,

    Thanks for the quick response. I tried swapping all instances of home-cta & home-slider in the home.php file… Its live now, take a look and you’ll see the top area is all white.

    http://vincenti.com/newsite/

    This only happens when the code for home-cta is set directly before the code for home-slider.

    What I’m trying to achieve is this exact widget order on the homepage:
    1. Home CTA
    2. Home Slider
    3. Home Top
    4. Home Middle

    Any other suggestions?

    #61516

    braddalton
    Participant
    Post count: 10587

    Try use the same order in your home.php file as what you have above.

    You shouldn’t need to modify any CSS code.


    #61518

    lvdesign
    Participant
    Post count: 4

    Everything is set in the order as I’ve stated in my earlier response.

    In home.php at the top:

    function executive_home_genesis_meta() {
    
    	if ( is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-middle' ) ) {

    And then toward the bottom:

    function executive_home_sections() {
    
    	if ( is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-middle' ) ) {
    
    		
    		genesis_widget_area( 'home-cta', array(
    			'before' => '<div class="home-cta widget-area">',
    		) );
    
    		genesis_widget_area( 'home-slider', array(
    			'before' => '<div class="home-slider widget-area">',
    		) );
    
    		genesis_widget_area( 'home-top', array(
    			'before' => '<div class="home-top widget-area">',
    		) );
    
    		genesis_widget_area( 'home-middle', array(
    			'before' => '<div class="home-middle widget-area">',
    		) );
    		   
    	}

    Its really odd. If I move the HOME-TOP in between the CTA and SLIDER, then everything shows up. But that is not the order I want. I need CTA, SLIDER, TOP, MIDDLE. Otherwise, I’ll have to try another solution without the CTA above the slider to work around this.

    #61523

    braddalton
    Participant
    Post count: 10587
    #61534

    lvdesign
    Participant
    Post count: 4

    Hi Brad,

    I pasted your version of home.php into mine. It looks exactly like what I’ve had. There’s no change on the live site. Still no CTA and still no Slider.

    http://vincenti.com/newsite/

    #61536

    braddalton
    Participant
    Post count: 10587

    Weird. Not sure what the problem is sorry.

    Did you modify any CSS code?


    #61540

    lvdesign
    Participant
    Post count: 4

    It is weird! But thank you for taking a look at it. I wanted to make sure I wasn’t crazy.

    I think I’ll figure a work around for this. Its not critical that the theme’s designated “CTA” property be used. I’m thinking I can try to create a new widget area and place arbitrary text widget into that area. The ultimate goal is to get 2 lines of website intro copy above the slider rather than below.

    Thanks again!

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

You must be logged in to reply to this topic.