How to Display Only Parent Category Names with Dynamic

I have a custom taxonomy named ‘collection,’ which functions similarly to a category. Within this taxonomy, we have subcategories like Movies > ABC. However, when I utilize dynamic text, it retrieves all categories, including child categories like Movies and ABC. My objective is to solely exhibit the names of the parent categories.

I am seeking assistance from your esteemed team. Thank you.

2 Likes