• i just updated Modularity Lite and lost all the settings including slideshow.

    https://www.candmphotography.com/

    i figured out how to show images, but it only shows 2 images even though there should be 3. it is rotating only 2 latest featured images. i would like to rotate 5-10 images there.

    where do i need to change? i am not familiar with php too much.

    thanks

Viewing 1 replies (of 1 total)
  • Thread Starter fatneko

    (@fatneko)

    update:

    just found out it only shows featured images from posts that are showing on homepage only.

    so once these posts are off the homepage, they are not included in slideshow at all.

    what do i need to change, so that it looks for featured images that are 950×425 from all the posts including post that are not on homepage?

    <?php if ( $options['slideshow'] != 0 ) : ?>
    	<div id="slideshow">
    	<?php
    	// Start a new query that looks at all the posts on the home page.
    	$mod_slide = new WP_Query();
    	$mod_slide->query( 'order=DESC&caller_get_posts=1' );
    
    	while ($mod_slide->have_posts()) : $mod_slide->the_post();
    
    		// Check to see if the posts have attachments.
    		$attachments = get_children(array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order'));
    		if ( empty( $attachments ) )
    			continue;
    
    		// Set our attachment variable.
    		$first_attachment = '';
    
    		// Awesome! We have attachments! Let's grab the first one that's 950px x 425px.
    		foreach ( $attachments as $attachment ) {
    			$image = wp_get_attachment_image_src( $attachment->ID, 'modularity-slideshow' );
    
    			if ( $image[1] >= 950 && $image[2] >= 425 ) {
    				$first_attachment = $attachment;
    				break;
    			}
    		}	
    
    		// Cool. Now, if we actually have an attachment, let's pop it into our slideshow.
    		if ( $first_attachment != '' ) { ?>
    			<div class="slide"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php echo wp_get_attachment_image($first_attachment->ID, 'modularity-slideshow' ); ?></a></div>
    		<?php }
    
    	endwhile;
    	?>
    	</div><!-- end slideshow -->
Viewing 1 replies (of 1 total)
  • The topic ‘Modularity Lite 1.3 slideshow only shows 2 images’ is closed to new replies.