Community Forums › Forums › Archived Forums › General Discussion › Executive Theme, HTML 5, Home Div Issue
Tagged: Executive theme, home page, html5, widgets
- This topic has 5 replies, 4 voices, and was last updated 10 years, 7 months ago by christophermillsap.
-
AuthorPosts
-
July 3, 2013 at 7:12 am #48955ceswebMember
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.
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 add_action( 'genesis_meta', 'executive_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function executive_home_genesis_meta() { if ( is_active_sidebar( 'home-slider' )|| is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-top' ) /*|| is_active_sidebar( 'home-middle' )*/ ) { remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'executive_home_sections' ); add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); add_filter( 'body_class', 'executive_body_class' ); add_action( 'genesis_after', 'executive_slider_excerpt_position' ); /** Add body class to home page **/ function executive_body_class( $classes ) { $classes[] = 'executive-home'; 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( '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-cta', array( 'before' => '<div class="home-cta 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">', // ) ); } } genesis();
July 4, 2013 at 8:58 am #49180ceswebMemberbump
July 4, 2013 at 9:46 am #49191nickthegeekMemberPlease 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
genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area">', 'after' => '</div>', ) );
You need to do that for any genesis_widget_area() function.
July 4, 2013 at 9:46 am #49192nickthegeekMemberoh, and bumping your post is actually a good way to make sure it isn't seen by the folks helping out.
August 27, 2013 at 12:29 pm #59076Bart van MaanenParticipantHi 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.February 9, 2014 at 6:52 pm #89558christophermillsapMemberHey 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!!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.