0

I have a category group that's attached to several channels, including the jobs channel.

This isn't the way I'd have configured this initially but never mind.

I have 2 parent categories USA & Europe and then cities as sub categories. I want to show the cities and the jobs in those cities.

Not all cities have jobs and right now, using GWCategories, I'm spitting out cities where there are no jobs.

{exp:gwcode_categories channel="jobs" last_only="yes" cat_id="13" show_empty="no"}
{cat_name}
{/exp:gwcode_categories}

Gives me all cities, irrespective of whether they have jobs or not.

  • Have you tried adding the entry_id="" parameter to the gw cats tag? – Bluedreamer Feb 24 '16 at 21:42
0

The issue turned out to be the status parameter. Several entries with 'closed' status.

Code that works is

{exp:gwcode_categories 
  status="open" 
  channel="jobs" 
  show_empty="no" 
  last_only="yes"
  cat_id="19"
}

  {cat_name}
  {embed="careers/.jobs" cat_id="{cat_id}"}

{/exp:gwcode_categories}
| improve this answer | |

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.