So my url/slug structure looks like this /toolkit-category/downloads/gui-kits. Within /downloads is other child categories/terms. I am trying to fetch the other siblings of gui-kits when on /gui-kits. "toolkit_category" is the name of my taxonomy that is acting as categories, built using PODS.

$queried_object = get_queried_object('term');
$tax = $queried_object->taxonomy;
$term = $queried_object->term_id;
$parent = $queried_object->parent;

$next_items = get_term_children( $term, $tax );

The above code doesnt work, returns nothing?

Any help is appreciated :)


Figured it out:

$carousel_items = get_queried_object();
$next_items = get_terms(
    array('parent' => $carousel_items->parent,)
| improve this answer | |
  • May you please update your answer on how your code helps solve your question? – Ethan O'Sullivan Oct 4 '16 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.