Hi masterbassie,
I’ll look into both of these things for you.
I’m using some pre-defined WP commands for the category dropdown so will need to read up on what’s possible with this. I’ll also looking at a “random” selection option and an extension to the 5 / 10 post limit.
You can keep up to date on the plugin and updates at http://www.d13design.co.uk/wordpress/d13slideshow.
Dave.
In my own impatience i devised a remedy (sort of). Only problem is I couldn’t figure out how to print out all the array values parsed by a comma into the d13 php call. So i kinda improvised. Its a very down and dirty ‘fix’ for anyone who needs it.
<?php
$args = array(
‘numberposts’ => 10,
‘category’ => 8,
‘orderby’ => rand
);
$lastposts = get_posts($args);
foreach($lastposts as $post) :
setup_postdata($post);
?>
<?php
$ID_Array[]=$post->ID;
?>
<?php endforeach; ?>
<?php d13slideshow(array($ID_Array[0], $ID_Array[1], $ID_Array[2], $ID_Array[3], $ID_Array[4], $ID_Array[5], $ID_Array[6], $ID_Array[7], $ID_Array[8], $ID_Array[9])); ?>
FYI, you can use masterbassie code in category.php, and have a slider preview dynamically for every category!
<?php
function getCurrentCategoryId()
{
if (is_category()) {
global $wp_query;
$cat_obj = $wp_query->get_queried_object();
return $cat_obj->term_id;
}
return -1;
}
$args = array(
'numberposts' => 3,
'category' => getCurrentCategoryId(),
'orderby' => rand
);
$lastposts = get_posts($args);
foreach($lastposts as $post) :
setup_postdata($post);
?>
<?php
$ID_Array[]=$post->ID;
?>
<?php endforeach; ?>
<?php d13slideshow(array($ID_Array[0], $ID_Array[1], $ID_Array[2], $ID_Array[3], $ID_Array[4], $ID_Array[5], $ID_Array[6], $ID_Array[7], $ID_Array[8], $ID_Array[9])); ?>