Show parent category in dynamic content

Hi there, when using {{dc:term:name}} I want the parent category to be shown. Right now the subcategory is displayed. How do I change that?

Hi @ArtOfSpring,

Are you trying to show the Parent Category of the current term, or {{dc:term:name}} shows the sub-category instead of the current term? If you want to show the Parent Category of the current term, that is not possible with the Dynamic Content tag you are using, it shows the current term only. If that is not the case, please explain it a bit more for further assistance.

Thanks

Hi there, I’m trying to show the selected parent category of the post. It was working until I added sub-categories. Now {{dc:term:name}} is only showing the selected sub-category.

Hello @ArtOfSpring,

Please be advised that the {{dc:term:name}} can be used in an archive page to display the current name of the term or category. If are using the Looper Provider All Terms or Looper Provider Current Post Terms , you can use {{dc:term:name}} as well.

If you want to display the parent and the sub category of the current post, you will need to create a custom PHP function for that because the {{dc:term:name}} is not intended for displaying the parent category. Be advised that custom coding is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

In the meantime, please check out this old thread as it may help you get started with a Looper Provider Custom.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.