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

EE 5.2.3 exp:channel:categories not working, don't know why!

News and General

Ngon Com's avatar
Ngon Com
14 posts
5 years ago
Ngon Com's avatar Ngon Com

Hi,

I have a simple list information from a specify category, but nothing return.

{exp:channel:categories category_group="1" show="112"}

{category_name}

{/exp:channel:categories}

Thanks!

       
Rob Allen's avatar
Rob Allen
2,950 posts
5 years ago
Rob Allen's avatar Rob Allen

You need to use a tag pair for categories:

{categories}{category_name}{/categories}

       
Ngon Com's avatar
Ngon Com
14 posts
5 years ago
Ngon Com's avatar Ngon Com

Hi Rob,

{categories} only work if wrapped inside {exp:channel:entries}, I want show only a specify category, seem parameter (show=”112”) not working.

       
Rob Allen's avatar
Rob Allen
2,950 posts
5 years ago
Rob Allen's avatar Rob Allen

Ah yes sorry misread the type of tag!

Two things to check:

  1. Add a channel=”mychannel” parameter to the categories tag
  2. If using custom statuses you’ll probably need to add status=”not closed” or status=”open|mycustomstatus”
       
Ngon Com's avatar
Ngon Com
14 posts
5 years ago
Ngon Com's avatar Ngon Com

Add both channel=”” + status=”” parameter still not work. The show=”” parameter when added return blank, please re-testing.

I want to notice that show=”” parameter not working!

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

It’s working for me with virtually that exact code.

{exp:channel:categories category_group="1" show="27"}

{category_name}

{/exp:channel:categories}

Tried {exp:channel:categories channel="blog" category_group="1" show="27"} and that also worked.

Any chance you could have the wrong number? If you remove the show and just do:

{exp:channel:categories category_group="1"}

{category_name} - {category_id}

{/exp:channel:categories}

Do you get all the categories and is the category id what you were using in ‘show’?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

Oh- any chance it’s a child category? In that case, see docs: > If you specify a child category be shown, you must also include its parent category to be shown.

       

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.