Community Forums › Forums › Archived Forums › General Discussion › Executive – move CTA above home-slider
- This topic has 8 replies, 2 voices, and was last updated 10 years, 7 months ago by lvdesign.
-
AuthorPosts
-
September 7, 2013 at 10:50 pm #61308lvdesignMember
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:
http://vincenti.com/newsite/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">', ) ); }
September 7, 2013 at 10:57 pm #61309Brad DaltonParticipantChange all instances of home-cta to home-slider and all instances of home-slider to home-cta in your home.php file.
September 9, 2013 at 8:35 am #61506lvdesignMemberHi 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.
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 MiddleAny other suggestions?
September 9, 2013 at 9:18 am #61516Brad DaltonParticipantTry use the same order in your home.php file as what you have above.
You shouldn't need to modify any CSS code.
September 9, 2013 at 9:32 am #61518lvdesignMemberEverything 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.
September 9, 2013 at 10:29 am #61523Brad DaltonParticipantSeptember 9, 2013 at 11:13 am #61534lvdesignMemberHi 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.
September 9, 2013 at 11:21 am #61536Brad DaltonParticipantWeird. Not sure what the problem is sorry.
Did you modify any CSS code?
September 9, 2013 at 11:25 am #61540lvdesignMemberIt 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!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.