Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m having the exact same issue. Not getting any error messages or anything. Any help would be appreciated.

    Thread Starter joshofsorts

    (@joshofsorts)

    Nevermind, I finally figured this out. I changed echo $attachments->url("original"); to echo $attachments->src("original"); and now everything works fine.

    Thread Starter joshofsorts

    (@joshofsorts)

    I forgot to mention before that I am using the Supersized jQuery plugin and the two do not seem to be playing nicely together. I tried the code from the examples without Supersized and it pulled up all the images, but still no luck with Supersized. It is still only pulling up the first image/thumbnail in the series when using Supersized. Perplexingly, the thumbnail tray displays the first thumbnail in the series the precise number of times there are images to display, so it seems to be aware of the other images (as it is counting them correctly). Here is my code revised slightly to include a search function. Once again, any help would be much appreciated.

    <?php $args = array(
    	'post_type' => 'gallery'
    );
    
    $query = new WP_Query( $args );
    
    // The Loop
    if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
    
    <script type="text/javascript">
    var slides=[];
    <?php $attachments = new Attachments('my_attachments');
    $search_args = array(
    	'instance'      => 'my_attachments',   // (string) the instance you want to search
    	'post_type'     => 'gallery',            // (string) search 'any' post type
    	'post_status'   => 'publish',       // (string) search only published posts
    	'fields'        => array('option'),            // (string|array) search all fields
    );
    
    $attachments->search( '1', $search_args ); // search for 'Featured Image'
    
    if( $attachments->exist() ) : while( $attachments->get() ) : ?>
    
    			slides.push({
    				image : '<?php echo $attachments->url("original"); ?>',
    				title : '? <?php the_time('Y'); ?>',
    				thumb : '<?php echo $attachments->url("supersized_thumb"); ?>',
    				url : ''
    			});
    
    <?php endwhile; endif; ?>
    
    <?php endwhile; endif; ?>

    Try turning off some plugins and then upgrade automatically. After it has upgraded WordPress, then turn the plugins back on.

Viewing 4 replies - 1 through 4 (of 4 total)