We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Show entry count for categories

How Do I?

Okapi Creative's avatar
Okapi Creative
359 posts
9 years ago
Okapi Creative's avatar Okapi Creative

This in EE v2.10 - we have a gallery which consists of images from countries; France, Germany, Spain etc. The country is a category and on the ‘home’ page there is a link for each country with the entry count by the side of it… i.e.: Spain (5) for example. So far so good.

The problem is that there are also categories for the years (2013 - to present) so this number is skewed and essentially represents ALL Spain entries from ALL years.

We’re using Stash to get the cat IDs for the years and the countries and using GWcode Categories to get the count but the problem is GWcode Categories cannot take two IDS (I think - can’t seem to get any info from the developer as of yet) so we need another solution.

This would be perfect:

{exp:gwcode_categories cat_id="3&9"}

But there apparently cannot be two IDs in there like that, at least it does not work. So is there any other solution? Would it require a query? If so then what would it look like?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.