ID; // related category posts $catlist = ""; forEach( $cats as $c ) { if( $catlist != "" ) { $catlist .= ","; } $catlist .= $c->cat_ID; } $newQuery = "cat=" . $catlist; query_posts( $newQuery ); $categoryPosts = ""; $count = 0; if (have_posts()) { while (have_posts()) { the_post(); if( $count<4 && $currentId!=$post->ID) { $count++; $topic=get_post_custom_values("_video_description"); $link= get_permalink(); $categoryPosts .= '
  • ' . $topic[0] .'

    '. the_title( "", "", false ).'

  • '; } } } $wp_query = $tempQuery; ?> have_posts()) : $wp_query->the_post(); ?>