Forum

Thread tagged as: Question, Shop

How to Show Category Title on Product Template

I have a product detail page built as a template. I need to show the Title of the category or its path on the product. When I try to output the category I get the ID of the category and not the title.

<perch:shop id="category" />

How can I get the title or path of the category within a template?

Jared Buttars

Jared Buttars 1 points

  • 3 years ago
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hello Jared,

You need to use perch:categories tag pair:

<perch:categories id="category" set="products">
  <perch:category id="catTitle" />
</perch:categories>

Thank you!