[SOLVED] Possible? > Related and/or child categories on category archive?

I would like to have a header for every archive, where the current archive title is followed by a link list of child categories or related categories (related by same parent).

Is that possible?

The same as the Newspaper theme has

bricks-07

1 Like

If it’s on the product archive, you might be able to use {echo:get_queried_object_id} on Query parent field.

Kindly refer to Creating dynamic WooCommerce archive pages – Bricks Academy
Step 3

Regards,
Jenn

2 Likes

Thank you @itchycode

In my case it is in/for standard posts.

Do you mean the normal posts archive?
The same way can be applied to different post types and not limited to WooCommerce product types.

You can try it out on your website first. It should work.

Thank you!
I’ll look into this

Thank you - this was a great tip.
In case it helps anyone… I also found you can get ONLY the first child Categories by putting {echo:get_queried_object_id}
In both PARENT and CHILD OF - in the query.
In a category archive, this returns just same-level categories, enabling you to ‘walk down’ the category tree and show ‘next branches’ to go down - with a single template.

e.g.
Cat_Main
SubCat 1 - Subcat a, subcat b, subcat c
SubCat 2 - Subcat X, subcat Y (subSub Y2, Y3, Y4), Subcat Z (subsub Za, Zb, Zc)

On Cat_main page you see SubCat 1 and SUbCat 2
On SubCat 2 page you see X,Y,Z
On subcat Y page you see Y2,Y3,Y4

1 Like

the academy article was about woocommerce, can you please rewrite the steps for custom post type/posts?