1

I'm using jQuery Supersized to create a full screen image slideshow. The images are called from a custom post type called Slides.

The code works fine but I want to be able to only pull in Slides in a specific category and for some reason I can't get this to work.

I've tried adding '&category_name=' to the first line to this but it's not working:

query_posts('post_type=slides&category_name=project1&order=ASC&posts_per_page=-1');

Any ideas?

Thanks

query_posts('post_type=slides&order=ASC&posts_per_page=-1');
$output = "";
$n= 0;

//Loop for Post Types Slides
if ( have_posts() ) while ( have_posts() ) : the_post();
$n++;

//Slide Image
$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');

//Get the Slide meta info
$slide_link = get_post_meta(get_the_ID(), 'mb_slide_link', true);

$output.="{";
$output.="image : '". $thumbnail[0] ."'";

if($slide_link != ''){
$output.=" , url : '". $slide_link." '";
} ;

$output.="},";
  • Just figured it out. The post type had a custom taxonomy so had to replace category_name with slides_categories – fxfuture Aug 16 '11 at 0:44
  • Please submit this as your own "Answer" and then mark it as such. – GavinR Aug 17 '11 at 4:30
0

Just figured it out. The post type had a custom taxonomy so had to replace category_name with slides_categories

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.