0

I have the following code below. Trying to show categories from one category group, but instead all categories are being outputted. I've tried using category_group="1", but no luck. Any help is much appreciated.

{exp:channel:category_archive channel="speakers" style="linear" backspace="7" category_group="1"}
    <li>
        {categories}
            <a class="btn-open" href="#">{category_name}</a>
        {/categories} 
        {entry_titles}  
        <ul class="list-unstyled"> 
            <li><a href="{path='site/speaker'}">{title}</a></li>
        </ul>  
        {/entry_titles}     
    </li>   
{/exp:channel:category_archive}     
1

This doesn't seem to be an option.

https://ellislab.com/expressionengine/user-guide/add-ons/channel/category_archive.html

I curled and searched that page and found zero references to "Category Group" (case insensitive search). How dynamic is that group? Can you use the show parameter and list the categories you want to show?

{exp:channel:category_archive channel="speakers" style="linear" backspace="7" show="1|3|5|7|9|666"}
<li>
    {categories}
        <a class="btn-open" href="#">{category_name}</a>
    {/categories} 
    {entry_titles}  
    <ul class="list-unstyled"> 
        <li><a href="{path='site/speaker'}">{title}</a></li>
    </ul>  
    {/entry_titles}     
</li>   
{/exp:channel:category_archive} 

I know that is a pain, but sometimes we must develop and play the maintenance game.

Edit Thanks for giving me the check; but I'm an idiot and just thought of a much better potential answer!

https://ellislab.com/expressionengine/user-guide/add-ons/channel/categories.html#variables

Try this parameter! (assuming your cat group is 1):

show="{exp:channel:categories category_group='1'}{category_id}|{/exp:channel:categories}"
3
  • show parameter will just have to do work. Luckily I only have one cat that I don't want to show so using show="not {category_id}" will work. Thank you for the help. – frshjb373 Jul 10 '15 at 15:28
  • I've updated my answer with a smarter solution (If it works!!) – jrothafer Jul 10 '15 at 15:41
  • I like the idea, but unfortunately iI'm getting a blank output that way. If you have any other ideas, please let me know! – frshjb373 Jul 10 '15 at 17:53

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.