[resolved] "Stay" Theme for WordPress.com - Homepage slider not working (10 posts)

  1. gabrielle.green
    Posted 2 years ago #

    Checked out the WordPress.com theme "Stay" from the SVN because it's the theme my client wants to use but I can't get the homepage slider to work even after designating the "Homepage" and adding featured images to the pages.

    I'm guessing that there is some naming convention that differs slightly in .org from .com for the posts/pages which is why it is not recognizing that there are any images/posts/pages to pull from and place in the slider.

    Here is the site: http://csghudsonvalley.com/

    Can anyone help?

  2. paulwpxp
    Font hero
    Posted 2 years ago #

    There is this <div class="flexslider" id="featured-content"> in the source of your home page, which means that if ( $slider->have_posts() ) : returns true. So your settings is good.

    But the content inside it doesn't show up, this could be that the featured image assigned to those pages don't have enough width as assigned in the logic.

    Check if the images attached to those pages really assigned as featured image AND is 960px or larger in width.

  3. gabrielle.green
    Posted 2 years ago #

    Yup, they are definitely both of those things. >960px and assigned as the featured image.

  4. WPyogi
    Forum Moderator
    Posted 2 years ago #

    Might be that the slider requires JetPack - similar question here:


  5. gabrielle.green
    Posted 2 years ago #

    Well, I added the JetPack plugin and still no slider. Connected with a WordPress.com account and activated the Carousel feature.

  6. paulwpxp
    Font hero
    Posted 2 years ago #

    Are those images uploaded before or after switching to this theme ?

    Images uploaded before changing to this theme won't get the size name of slider-img which is registered in theme's function

    add_image_size( 'slider-img', 1200, 500, true );

    This size is used as the conditional check in slider.php, along with the if ( $image[1] >= 960 ).

    while ( $slider->have_posts() ) : $slider->the_post();
    	if ( '' != get_the_post_thumbnail( $post->ID ) ) :
    		// Now let's check the image.
    		$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'slider-img' );
    		// If it is greater than 960 in width, let's skip
    		if ( $image[1] >= 960 ) :

    Disregard the "let's skip" comment there, I think it's a typo. The intention is to not do anything if image size is less than 960. But the $image is pulling from slider-img size which is cropped exactly to 1200x500. The 960 check is to prevent in case user upload too small image to look good in slider.

    In short, delete images from pages that you set to be featured, and reupload them. To look good, make sure it's 1200x500 or bigger.

  7. gabrielle.green
    Posted 2 years ago #

    @paulwrphp Eureka! it finally works. Just had to reupload the pics. Thank you everyone for your help. I hope this thread helps someone in the future!

  8. Manikup
    Posted 1 year ago #

    I also have trouble to configure this slider
    It's mealy because I don't use the configuration in english and I don't understand what "assigned as the featured image" mean. I'm a bit lost

    Could you pleas help me?

  9. czeller
    Posted 1 year ago #

    This is going to help me immensely, thank you SO much-

  10. gretchenclairegarnett
    Posted 1 year ago #

    I went through ALL these steps to no avail, still no images on the home page. Finally determined that I needed to deactivate the Photon Jet Pack plugin and that did the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.