Created
June 16, 2017 04:04
-
-
Save qwersk/bd4be42b5a2874c22925c52c04438f17 to your computer and use it in GitHub Desktop.
GET SUBCATERY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 163 - necessary category id | |
| // "category" - taxonomy name | |
| $children_id = get_term_children(163, "category"); | |
| foreach($children_id as $child){ | |
| $term = get_term_by("id", $child, "category"); | |
| $id = $term->term_id; | |
| $name = $term->name; | |
| $count = $term->count; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment