Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.="},";
share|improve this question
    
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

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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