Get all categories post is not in
Ok. So, the first bit of code is more correct but it has issues nonetheless. Piece by piece… $categories = get_the_category( $post_id ); $post_id is not set in the code you posted. I assume that value is set earlier in the page somewhere, else that is your first problem. $nocats = get_terms(‘category’, array(‘exclude’ => $categories) … Read more