I'm trying to set up related posts that show posts in the same category as the current. The way the clients blog is set up is that they all share the category "blog", the related posts will show the same thing for every post.
<?php $related = get_posts( array(
'category__in' => wp_get_post_categories($post->ID),
'numberposts' => 4,
'post__not_in' => array($post->ID)
) );
?>
I need to get posts that aren't the primary category (Blog). I can't do "cateogry__not__in" because then it would exclude everything.
wp_get_post_categories($post->ID)so it doesn't include the blog-category? - janh'category__in' => array_diff( wp_get_post_categories($post->ID), array(5) ),.... (where 5 is the ID of the blog category....) - random_user_name