Get term siblings of current child taxonomy

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 :)

Topic pods-framework terms php taxonomy Wordpress

Category Web


Figured it out:

$carousel_items = get_queried_object();
$next_items = get_terms(
  $carousel_items->taxonomy,
    array('parent' => $carousel_items->parent,)
);

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.