get all categories code example Example: get_categories not__in $categories = get_categories(array( 'exclude' => $post_id, ));