saharusa could you please be more specific? where should I add those lines?…my numbers are probably different. Here is part of the code
if ( $croer_cat != 0) {
// Cat
$query= "SELECT * ".
"FROM $wpdb->posts JOIN ($wpdb->term_relationships, $wpdb->term_taxonomy) ".
"ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id AND $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) ".
"WHERE $wpdb->term_taxonomy.term_id IN $c_cat_and_subcats AND post_type = 'post'";
//echo "br>".$query;
} else {
// not cat
$query= "SELECT * ".
"FROM $wpdb->posts JOIN ($wpdb->term_relationships, $wpdb->term_taxonomy) ".
"ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id AND $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) ".
"WHERE post_type = 'post'";
}
$query.="ORDER BY ID DESC ;";
// echo "<br>Q:".$query;
$result = mysql_query($query);
?>
<tr>
Thanks