can this help?
$category = get_the_category();
if (!empty($category))
$cat_tree = get_category_parents($category[0]->term_id, FALSE, ‘:’, TRUE);
$top_cat = split(‘:’,$cat_tree);
$cat_slug = $top_cat[0];
query_posts(‘posts_per_page=15&category_name=’.$cat_slug.’&orderby=rand’);
Thread Starter
eian00
(@eian00)
and how would it show the posts with that category and with the same value from a custom field?
now there should be a way to join mine and your code, but how?