I was feeling lucky today so I went in just to see if I could fix the multiple categories issue and sure enough, piece of cake.
In order for this to send a list or categories rather than just the first, I needed to change this (in frontpage-slideshow.php):
$cats = get_the_category($fspost->ID);
$cat = $cats[0]->slug;
To this:
$cats = get_the_category($fspost->ID);
$categories = "";
foreach ($cats as $cat) {
$categories .= "fs-" . $cat->slug . " ";
}
And this:
$fsentries[] = array('title' => $title.' ', 'image' => $image, 'comment' => $comment.' ', 'button-comment' => $buttoncomment.' ', 'link' => $link, 'cat' => $cat);
To this:
$fsentries[] = array('title' => $title.' ', 'image' => $image, 'comment' => $comment.' ', 'button-comment' => $buttoncomment.' ', 'link' => $link, 'cat' => $categories);
(Because I needed a new variable to hold the string of categories)
Then in my template file I needed to change this:
function fsChangeSlide2() {
...
jQuery("#fs-entry-"+fsid).addClass('fs-current');
if (fscats[fsid] != '') {
jQuery("#fs-slide").addClass('fs-'+fscats[fsid]);}
frontpageSlideshow();
}
function fsDoSlide() {
...
if (fsid>-1) jQuery("#fs-entry-"+fsid).removeClass("fs-current");
if (fsid>-1) jQuery("#fs-slide").removeClass('fs-'+fscats[fsid]);
...
}
To this:
function fsChangeSlide2() {
...
jQuery("#fs-entry-"+fsid).addClass('fs-current');
if (fscats[fsid] != '') {
jQuery("#fs-slide").addClass(fscats[fsid]);}
frontpageSlideshow();
}
function fsDoSlide() {
...
if (fsid>-1) jQuery("#fs-entry-"+fsid).removeClass("fs-current");
if (fsid>-1) jQuery("#fs-slide").removeClass(fscats[fsid]);
...
}
(Because I added the 'fs-' prefix into the string variable I sent so it doesn't need to be added here)
And now a nice list of categories formatted to work with the 'class' attribute is sent to front-page slideshow and you can have default backgrounds for posts of different categories. I add the 'fs-' prefix in case you, like me, want to have a slightly different style for things in the slideshow and things of the same category in the body of your site.
Hopefully this helps someone, sorry I'm not a better teacher :(