• 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

Change Width for only Home – Slider in Executive Pro

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 › Design Tips and Tricks › Change Width for only Home – Slider in Executive Pro

This topic is: not resolved

Tagged: executive pro, home slider

  • This topic has 1 reply, 2 voices, and was last updated 6 years, 7 months ago by Victor Font.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 26, 2016 at 3:47 pm #190242
    SociallyExceptional
    Participant

    Hello!

    How can I get the size of the Home-Slider area on this Executive Pro theme here: http://charisbiblecollegekansascity.org/NewCBC/ . All that needs to go the full length of the screen is the slider, so I don't want to change the margins for the entire page.

    Thanks in advance!

    http://charisbiblecollegekansascity.org/NewCBC/
    July 27, 2016 at 6:08 am #190286
    Victor Font
    Moderator

    Your site is locked so we can't see the code, but the principle is to move the slider widget to a different Genesis hook that is outside of the site-container. The genesis_before hook will do this for you. You have to modify the theme's front-page.php. Create a new function in the page:

    function executive_home_slider() {
        genesis_widget_area( 'home-slider', array(
    		'before' => '<div class="home-slider widget-area">',
    		'after'  => '</div>',
    	) );
    }

    Remove the home-slider markup from the current executive_home_sections() function.

    Add add_action( 'genesis_before', 'executive_home_slider' ); just after the remove_action( 'genesis_loop', 'genesis_do_loop' ); and before add_action( 'genesis_loop', 'executive_home_sections' ); in the executive_home_genesis_meta function.

    function executive_home_genesis_meta() {
    
    	if ( is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-middle' ) ) {
    
    		remove_action( 'genesis_loop', 'genesis_do_loop' );
    		add_action( 'genesis_before', 'executive_home_slider' );
    		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_add_home_body_class' );
    
    	}
    
    }

    You'll very likely have to restyle the area in css because you're moving it from its normal location.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ 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