• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Executive Theme, HTML 5, Home Div Issue

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: not resolved

Tagged: Executive theme, home page, html5, widgets

  • This topic has 5 replies, 4 voices, and was last updated 9 years, 1 month ago by christophermillsap.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 3, 2013 at 7:12 am #48955
    cesweb
    Member

    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
    
    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();
    July 4, 2013 at 8:58 am #49180
    cesweb
    Member

    bump

    July 4, 2013 at 9:46 am #49191
    nickthegeek
    Member

    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

    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 #49192
    nickthegeek
    Member

    oh, 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 #59076
    Bart van Maanen
    Participant

    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.

    February 9, 2014 at 6:52 pm #89558
    christophermillsap
    Member

    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!!

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble