cat_is_ancestor_of( int|object $cat1, int|object $cat2 )

Check if a category is an ancestor of another category.

13 related functions found for: cat_is_ancestor_of

Top ↑

Related terms found for this post

wp-parser-related-wordsadjac, adjacent, ancestor, cat, categori, categories, category, category-php, taxonomi, taxonomy, wp-includes
wp-parser-packageTaxonomy, WordPress

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • adjac
  • adjacent
  • ancestor
  • cat
  • categori
  • categories
  • category
  • category-php
  • taxonomi
  • taxonomy
  • Taxonomy
  • wp-includes
  • wp-includes/category.php

Top ↑

Description Description

You can use either an id or the category object for both parameters. If you use an integer the category will be retrieved.

Top ↑

Parameters Parameters


(int|object) (Required) ID or object to check if this is the parent category.


(int|object) (Required) The child category.

Top ↑

Return Return

(bool) Whether $cat2 is child of $cat1

Top ↑

Source Source

File: wp-includes/category.php


Top ↑

Changelog Changelog

Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.