Executive Theme, HTML 5, Home Div Issue

Community Forums Forums General Discussion Executive Theme, HTML 5, Home Div Issue

This topic is: not resolved

This topic contains 5 replies, has 4 voices, and was last updated by  christophermillsap 10 months, 1 week ago.

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

    cesweb
    Participant
    Post count: 5

    With the HTML5 update it appears that now my widget area of home-top/home-cta get put inside one another causing it to inherit the CSS And effectively mess up the full width / the CTA or if i move the CTA above, vise-versa.

    Screenshot:

    I have the include in my functions for the html 5 and did the find/replace as well as converted my CSS…

    Can someone help me out here as to what is causing this?
    Home.php[php]<?php

    add_action( &#039;genesis_meta&#039;, &#039;executive_home_genesis_meta&#039; );
    /**
    * Add widget support for homepage. If no widgets active, display the default loop.
    *
    */
    function executive_home_genesis_meta() {

    if ( is_active_sidebar( &#039;home-slider&#039; )|| is_active_sidebar( &#039;home-cta&#039; ) || is_active_sidebar( &#039;home-top&#039; ) /*|| is_active_sidebar( &#039;home-middle&#039; )*/ ) {

    remove_action( &#039;genesis_loop&#039;, &#039;genesis_do_loop&#039; );
    add_action( &#039;genesis_loop&#039;, &#039;executive_home_sections&#039; );
    add_filter( &#039;genesis_pre_get_option_site_layout&#039;, &#039;__genesis_return_full_width_content&#039; );
    add_filter( &#039;body_class&#039;, &#039;executive_body_class&#039; );
    add_action( &#039;genesis_after&#039;, &#039;executive_slider_excerpt_position&#039; );

    /** Add body class to home page **/
    function executive_body_class( $classes ) {
    $classes[] = &#039;executive-home&#039;;
    return $classes;
    }

    /** Moves the slider pager if the sidebars are active and the screen is wide enough */
    function executive_slider_excerpt_position() {
    ?>
    <script type="text/javascript">
    jQuery(document).ready(function() {
    if (jQuery(".slide-excerpt").length > 0) {
    jQuery(".flex-control-nav").addClass("nav-pos-excerpt");
    }
    });
    </script>
    <?php
    }
    }
    }

    function executive_home_sections() {

    if ( is_active_sidebar( &#039;home-slider&#039; ) || is_active_sidebar( &#039;home-top&#039; ) || is_active_sidebar( &#039;home-cta&#039; ) /* || is_active_sidebar( &#039;home-middle&#039; )*/ ) {

    genesis_widget_area( &#039;home-slider&#039;, array(
    &#039;before&#039; => &#039;<div class="home-slider widget-area">&#039;,
    ) );

    genesis_widget_area( &#039;home-cta&#039;, array(
    &#039;before&#039; => &#039;<div class="home-cta widget-area">&#039;,
    ) );

    genesis_widget_area( &#039;home-top&#039;, array(
    &#039;before&#039; => &#039;<div class="home-top widget-area">&#039;,
    ) );

    // genesis_widget_area( &#039;home-middle&#039;, array(
    // &#039;before&#039; => &#039;<div class="home-middle widget-area">&#039;,
    // ) );

    }

    }

    genesis();[/php]

    • This topic was modified 1 year, 5 months ago by  nickthegeek.
    • This topic was modified 1 year, 5 months ago by  nickthegeek.
    • This topic was modified 1 year, 5 months ago by  nickthegeek.
    • This topic was modified 1 year, 5 months ago by  nickthegeek.
    #49180

    cesweb
    Participant
    Post count: 5

    bump

    #49191

    nickthegeek
    Keymaster
    Post count: 756

    Please don’t paste your entire CSS file. That makes for REALLY long posts with a ton of code that just isn’t needed. That makes most volunteers walk away because it really creates a bit of an unmanageable thing. A much better solution is to fill in the URL field with the URL of your site. This creates a link automatically that opens in a new tab and is set to nofollow which is ideal for sharing your site for support. Seeing the site makes it possible to see the HTML markup and also the CSS if needed.

    As for your issue, the HTML5 output for the genesis_widget_area() function requires that you declare the “after” argument because “before” may not be a

    [php]
    genesis_widget_area( ‘home-top’, array(
    ‘before’ => ‘<div class="home-top widget-area">’,
    ‘after’ => ‘</div>’,
    ) );
    [/php]

    You need to do that for any genesis_widget_area() function.

    #49192

    nickthegeek
    Keymaster
    Post count: 756

    oh, and bumping your post is actually a good way to make sure it isn’t seen by the folks helping out.

    #59076

    Bart van Maanen
    Participant
    Post count: 30

    Hi Nick,

    I had the same issue with the home.php file with Executive. Your code above seems to do the trick, but do you have to declare 'after' => '</div>', for all child themes? I did not have this issue with Balance?
    Thanks.

    #89558

    christophermillsap
    Member
    Post count: 1

    Hey everybody!!!

    Noobie mcnooberson here,

    I’m also using the executive pro child theme.

    How do I make the CTA full width and also appear on all pages?

    Any help to the noobie is much appreciated.

    Thanks!!

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

You must be logged in to reply to this topic.