• 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

How to nest slider widget behind page content and adjust size?

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 › How to nest slider widget behind page content and adjust size?

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 3 years, 1 month ago by InAdvertent.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 3, 2018 at 4:26 pm #215072
    SummitOverworked
    Member

    I'm tweaking the genesis sample child theme. My goal is to get a slider that extends the full width of the browser window and to have the homepage content sit over the top of the slider slightly for depth.

    Using awesome code and help that was already floating around the internet I've gotten a slider widget area in but I cant figure out where to adjust other spacings or how to make the slider the width of the browser.

    Here is the code I put into functions.php to get the slider widget area:

    //Add in new Widget areas
    function themeprefix_extra_widgets() {
    	genesis_register_sidebar( array(
    	'id'            => 'slider',
    	'name'          => __( 'Slider', 'genesischild' ),
    	'description'   => __( 'This is the Slider area', 'genesischild' ),
    	'before_widget' => '<div class="wrap slider">',
    	'after_widget'  => '</div>',
    	) );
    }
    add_action( 'widgets_init', 'themeprefix_extra_widgets' );
    
    //Position the slider Area
    function themeprefix_slider_widget() {
    	if( is_front_page() ) {
    	genesis_widget_area ( 'slider', array(
    	'before' => '<aside class="slider-container">',
    	'after'  => '</aside>',));
    	}
    }
    
    add_action( 'genesis_after_header','themeprefix_slider_widget' );

    Any help would is greatly appreciated, I'm the IT guy for this company and WAY outside my comfort zone trying to do this. Please dont judge the design its just a default template from the pagebuilder plugin to give me something to design off of.

    http://staging.summitathleticclub.com/
    January 10, 2018 at 1:36 pm #215283
    SummitOverworked
    Member

    For anyone curious. I wasn't able to figure out how to adjust the widget area so instead I adjust the padding on the home page using the following:

    .home .site-inner {
    		clear: both;
    		padding-top: 0px;
    		word-wrap: break-word;
    }
    
    .home .entry {
    	background-color: #fff;
    	margin-bottom: 40px;
    	padding: 0px 80px 70px 80px;
    }

    Then just created the slider at the top of the page. Its not ideal, but it works.

    January 23, 2020 at 10:19 am #496134
    InAdvertent
    Participant

    the site looks very nice

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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