Community Forums › Forums › Archived Forums › Design Tips and Tricks › Minimum Pro Homepage slideshow
Tagged: Minimum Pro homepage slideshow
- This topic has 10 replies, 6 voices, and was last updated 11 years, 4 months ago by Brad Dalton.
-
AuthorPosts
-
August 28, 2013 at 6:56 am #59196bdParticipant
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 #59244Roberto GomezMemberyes is a good a idea, I am seek the same
August 28, 2013 at 1:14 pm #59286MarketLeanerMemberI 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 #59519Eli OverbeyMemberThanks 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 #59562TedParticipantHi 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 #59569Eli OverbeyMemberThanks 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 #59571TedParticipantIt 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 #59676bdParticipantThanks 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 #59682Brad DaltonParticipantHere's the easiest solution. http://www.studiopress.community/topic/minimum-pro-slideshow-on-homepage/#post-59681
No need to modify or remove any code.
September 2, 2013 at 7:46 am #60242bdParticipantThanks, 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 #60343Brad DaltonParticipant -
AuthorPosts
- The topic ‘Minimum Pro Homepage slideshow’ is closed to new replies.