• 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

Minimum Pro Homepage slideshow

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 › Minimum Pro Homepage slideshow

This topic is: resolved

Tagged: Minimum Pro homepage slideshow

  • This topic has 10 replies, 6 voices, and was last updated 10 years ago by Brad Dalton.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • August 28, 2013 at 6:56 am #59196
    bd
    Participant

    I would like to add a slideshow (mere images, not linked to posts) on the home page of my Minimum Pro site instead of the default background image.

    Thank you in advance for any suggestion/directions.

    August 28, 2013 at 11:02 am #59244
    Roberto Gomez
    Member

    yes is a good a idea, I am seek the same

    August 28, 2013 at 1:14 pm #59286
    MarketLeaner
    Member

    I haven't done this but I'd try to remove this from front-page.php

    //* Load scripts only if custom background is being used
    	if ( ! get_background_image() )
    		return;
    
    	//* Enqueue Backstretch scripts
    	wp_enqueue_script( 'minimum-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
    	wp_enqueue_script( 'minimum-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'minimum-backstretch' ), '1.0.0' );
    	wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => get_background_image() ) );

    And then register a widget for between the nav and site tagline area, and call a responsive slider plugin

    register widget area: http://www.carriedils.com/add-slider-minimum-theme/

    Download this plugin http://wordpress.org/plugins/genesis-responsive-slider/ and drag to new widget area in widgets.

    August 29, 2013 at 8:11 am #59519
    Eli Overbey
    Member

    Thanks for the help mintegrate!

    I've made it thus far:

    Removed:

    //* Load scripts only if custom background is being used
    	if ( ! get_background_image() )
    		return;
    
    	//* Enqueue Backstretch scripts
    	wp_enqueue_script( 'minimum-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
    	wp_enqueue_script( 'minimum-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'minimum-backstretch' ), '1.0.0' );
    	wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => get_background_image() ) );
    

    Registered:

    genesis_register_sidebar( array(
    	'id'	=> 'home-slider',
    	'name'	=> __( 'Home Slider', 'minimum' ),
    	'description'	=> __( 'This is the home slider', 'minimum' ),
    ) );
    

    And added to front_page.php:

    /** Add the featured image section */
    add_action( 'genesis_after_header', 'minimum_featured_image' );
    function minimum_featured_image() {
    	if ( is_home() ) {
    		echo '<div id="home-featured"><div class="wrap">';
    genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) ); 
    echo '</div></div>';
    	}
    	elseif ( is_singular( array( 'post', 'page' ) ) && has_post_thumbnail() ){
    		echo '<div id="featured-image">';
    		echo get_the_post_thumbnail($thumbnail->ID, 'header');
    		echo '</div>';
    	}
    }
    

    It worked! Only problem: It is outputting after the header (which is below the site tagline on minimum pro). I know I am calling for it "after_genesis_header" but still outputs after tagline.

    Thoughts? I can't give a URL because it's localhost, but I have a picture:

    As you can see, I have the space for the slider, just can't get it dropped in.

    August 29, 2013 at 11:17 am #59562
    Ted
    Participant

    Hi Eli,

    Yeah, I always like being able to have a slider on the homepage too. I'm a little weak in PHP so I can't guarantee the code, but I've also been tweaking the new theme a bit. This is what I've added to the functions.php

    /** Add the featured image section */
    add_action( 'genesis_after_header', 'minimum_featured_image' );
    function minimum_featured_image() {

    if ( is_home() ) {
    printf( '<div %s>', genesis_attr( 'home-slider' ) );
    genesis_structural_wrap( 'home-slider' );

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

    genesis_structural_wrap( 'home-slider', 'close' );
    echo '</div>'; //* end .home-slider
    }
    }

    And registered the widget area.....

    //* Register widget areas
    genesis_register_sidebar( array(
    'id' => 'home-slider',
    'name' => __( 'Home Slider', 'minimum' ),
    'description' => __( 'This is the homepage slider section.', 'minimum' ),
    ) );

    and that did the trick. I did remove the background image code on front-page.php but you could do that too.

    You can see my modification here: http://themes.imageperceptions.com/mpro4/

    One thing I am curious about. Where did you get that image? (City Center in Vegas)

    August 29, 2013 at 11:47 am #59569
    Eli Overbey
    Member

    Thanks Ted! Grabbed the photo online to use a filler so I could get the dimensions (1800px by 700px). In fact, I think I pulled the dimensions off your site. And now, I've changed it 🙂

    August 29, 2013 at 11:59 am #59571
    Ted
    Participant

    It caught me by surprise when I saw it. I took that shot a couple of years ago when I was down on the strip. 🙂

    I hope the code works. You'll need to style it in the css file. Are you adding the 'featured image' feature from v2.0? I noticed it didn't make it on this version. I didn't use it a lot but it was kind of cool. Might add it back in.

    I used it on the subsequent pages on my photography site: http://tavphotography.com

    Note: depending on where you work, my be NSFW

    August 30, 2013 at 6:20 am #59676
    bd
    Participant

    Thanks to everyone who has participated in this thread.

    I have removed the background image code from on front-page.php as suggested by mintegrated and added the code of Ted to functions.php. However, the widget (and thus the slider) is placed below the site tagline.

    How to move it above the tagline, in place of the former background image ?

    August 30, 2013 at 7:15 am #59682
    Brad Dalton
    Participant

    Here's the easiest solution. http://www.studiopress.community/topic/minimum-pro-slideshow-on-homepage/#post-59681

    No need to modify or remove any code.


    Tutorials for StudioPress Themes & WooCommerce.

    September 2, 2013 at 7:46 am #60242
    bd
    Participant

    Thanks, everyone. To the above solutions I would add this one: http://sridharkatakam.com/how-to-replace-background-image-in-minimum-pro-with-responsive-slider/.

    I for one have used Slider Revolution, which allows to choose between several possible layouts (fixed, custom, auto responsive, full screen) and works well. Of course, many other slider plugins are available to try.

    September 2, 2013 at 9:45 pm #60343
    Brad Dalton
    Participant

    @bd Link to your site please so i can take a look. Thanks.


    Tutorials for StudioPress Themes & WooCommerce.

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Minimum Pro Homepage slideshow’ is closed to new 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