ID; $posts_per_page = 9999; $query_string = "posts_per_page=".$posts_per_page; $query_string .= "&post_type=portfolio"; //$query_string .= "&portfolio_entries=".$k_option['portfolio']['matrix_slider_port_final'][$post->ID]; //doesnt work in wp3.0 // the query string now looks like this: // "cat=3,10,12&posts_per_page=9&paged=$paged"; // you can add additional query options if you want, all of them are described here: // http://codex.wordpress.org/Template_Tags/query_posts#Examples // append this parameters with the "&" sign // example: $query_string = $query_string."&orderby=author&order=ASC"; $additional_loop = new WP_Query($query_string); $categories = get_categories('title_li=&orderby=name&hide_empty=0&taxonomy=portfolio_entries&include='.$k_option['portfolio']['matrix_slider_port_final'][$post->ID]); echo '
'; echo '
'; ?>
category_nicename.'_sort">'.$category->cat_name.''; } ?>
'; ?>
have_posts()) : $the_link = get_post_meta($post->ID, "link", true); $columns = 4; // how many items beside each other? $count = 1; $last = ''; $openImage = 'lightbox'; if($k_option['portfolio']['portfolio_click'] == 2) $openImage = 'permalink'; while ($additional_loop->have_posts()) : $additional_loop->the_post(); $item_categories = get_the_terms( $id, 'portfolio_entries' ); $class_add = ""; $displayPost = false; if(is_object($item_categories) || is_array($item_categories)) { foreach ($item_categories as $cat) { $class_add .= $cat->slug.'_sort '; if(in_array($cat->term_id, $catarray)) { $displayPost = true; } } } if($displayPost) { if($count == 1) echo '
'; if($count == $columns) $last = 'last'; $prev_image = kriesi_post_thumb($post->ID, array('size'=> array('M','_preview_medium'), 'wh' => $k_option['custom']['imgSize']['M'], 'display_link' => array($openImage), 'linkurl' => array ('XL','_preview_big') )); echo "
"; echo $prev_image; echo "

".get_the_title()."

"; echo ""; the_excerpt(); echo "".__('Read more','cleancut').""; echo "
"; if($count == $columns) { $last = ''; $count = 0; echo "
"; } $count ++; } endwhile; if($count != 1) echo "
"; endif; ?>