0

I would like to display the number of entries of a given category within the same channel, and nothing else.

I've found this older question Display the number of entries in a channel but that does not solve my problem - I cannot add a category_id to the stats module, and I'm not much familiar with the Query module - but still haven't found anything useful in the documentation.

1

Maybe something like {exp:channel:entries channel="my_channel" category="2" dynamic="no"} {absolute_results} {/exp:channel:entries}

0

You can do this using the very helpful add-on "Category Construct". Something like this... all you need to know is the ID(s) of the channel(s) you want to count the entries for), and the ID of the category concerned.

{exp:category_construct:categories channel_id="{your_first_channel_id|your_second_channel_id|...etc}" cat_id="{your_chosen_category_id}" entry_count="true"}
    {construct:level_total_results}
{/exp:category_construct:categories}

Alternatively, this will output a list of categories and counts for a channel.

<ul>
 {exp:category_construct:categories channel_id="{your_first_channel_id|your_second_channel_id|...etc}" entry_count="true"}
   <li>{construct:cat_name}: {construct:level_count} entries</li>
 {/exp:category_construct:categories}
</ul>

HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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