Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I suppose you could do something like this to get the highest slider ID:

    if ( function_exists( "easingslider" ) ) { 
    
    $out = array();
    
    $args=array(
     'post_type' => 'easingslider',
     'post_status' => 'publish',
     'orderby' => 'ID',
     'order' => 'DESC',
     'posts_per_page' => -1,
     'caller_get_posts'=> 1
    );
    
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
     while ($my_query->have_posts()) : $my_query->the_post();
    	$out[] = get_the_ID();
     endwhile;
    }
    wp_reset_query();
    
    easingslider( max($out) );
    
    }

    but – I’m not a wordpress guru, mayby there is a better way…

    I have the same question.

    How to retrieve a list of all slider ID’s ?

    It would be great if a theme could pick a random slider ID.

    Maybe the shortcode [easingslider] could return by default the first or a random slider.

    Regards,
    Natan

    btw: nice plugin !

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