If I am on a product or any category/subcategory I want to display a complete path to the topmost category. Does WooCommerce already have a function for it or do I need to make my own loop that goes from child to parent? Should I use $wp_query->get_queried_object()? What is the best code for it?

Example: enter image description here

1 Answer 1


I think you may look for breadcrumb? Can you try it?

<?php woocommerce_breadcrumb(); ?>

This link may help: https://docs.woocommerce.com/document/woocommerce_breadcrumb/

  • Yes, that is it! Google just wouldn't give me this result no matter how I've described it. Feb 10, 2020 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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