Forum
category list
Hi, I try to display a list of a particular category and it does not work for me. Thanks.
My template is:
<div class="col-md-3 col-sm-4 col-xs-6">
<div class="category-item">
<perch:categories id="animal-care" label="animal-care" set="animal-care" required="false"><a href="categoria/<perch:category id="catPath" />"> <perch:category id="catTitle" /></a>
</perch:categories>
</div>
</div>
and the function:
perch_content_custom('Empresa', array(
'template' => 'empresa_listing_subcat03.html',
'page' => '/index.php',
'category' => 'animal-care/'
Are you trying to display the content within that category? If so, your template will need to output some of it - at the moment you're just outputting the category title and a link.
Yes, this template is just to list links to the categories of a Set, but the problem is that the categories are repeated by the number of items in that category, I just want a list of categories of a Set for linking, view image.
Thanks Drew.
Ok, so don't use
perch_content_custom()
as that's for displaying content. Useperch_categories()
to display the categories.Hi Drew, thanks. Mi function isn't working :(
That's because you've been making up syntax :)
https://docs.grabaperch.com/docs/categories/page-functions/
Brilliant Drew! Thanks again, great support.