Support » Fixing WordPress » Cannot get true category for breadcrumbs

  • When using breadcrumbs, and I have a Main Category, and 2+ SubCategories.

    When applying the following code, while i’m on’ Main Category’ page, it shows the breadcrumb for MainCategory >> FirstSubCategory.

    elseif (is_category()){
                           $category = get_the_category();
    			$ID = $category[0]->cat_ID;
    			echo get_category_parents($ID, TRUE, ' ยป ', FALSE );
  • The topic ‘Cannot get true category for breadcrumbs’ is closed to new replies.