0

I've searched for solutions on how to display the selected category, to no avail.

I need to display entries that has that category field selected within that channel

This code just opens the channel needed thats tagged with that category group. But if i select fields within that channel it gives me all, unchecked and checked category items.

{exp:channel:entries channel="channel_name" dynamic="no" category_group="category_id"} {/exp:channel:entries}

0

Using your code example are you trying to output one entry from a specific category group?

If so some if your syntax may need adjusting, you don't usually have curly braces as parameter values.

This example will show one entry from your_channel_name with category group ID 1:

{exp:channel:entries channel="your_channel_name" dynamic="no" limit="1 category_group="1"}
{title}
{/exp:channel:entries}
4
  • Hi Bluedreamer, thats correct yes, i just used the curly braces fr example purposes. So I've got a category with two items stored. E.g. Location and Experience. What I need to do is display all entries within that category group, that is only selected with Location category item. Does that make sense? – Tee Aug 28 '20 at 14:28
  • So are "Location" and "Experience" channel entries, or categories? – Bluedreamer Aug 29 '20 at 11:28
  • They are categories – Tee Aug 30 '20 at 18:02
  • So for example, "Destination" channel has a category called "Destination Types". And within the category Destination Types, there are "locations" & "months". Some destination entries are marked with "locations" and others with "months". What i need is to only display those destination entries marked with "locations". Sorry if im not making much sense, I know EE, but not too well. – Tee Aug 30 '20 at 18:08
0

Without seeing your exact setup it's worth trying the category parameter:

In this example it will only show entries that have been assigned to category ID 1 and 5

{exp:channel:entries channel="your_channel_name" dynamic="no" limit="1 category="1&5"}
{title}
{/exp:channel:entries}
5
  • Thank you for the example. This is my exact code I have right now, in the embed template. {exp:channel:entries channel="destination_info" category="9" limit="3" search:destination_parent="{embed:parent_id}"} {title}{/exp:channel:entries} – Tee Aug 31 '20 at 20:58
  • And within the template I want it to show, {embed="channel_group/template_name" parent_id="{entry_id}"}, but for some reason, nothing shows. Think I'm not connecting it properly. Once I get the entries to show that is within that channel, under that category. Then I need to only show the entries that is tagged with the 'Locale' category name. – Tee Aug 31 '20 at 21:02
  • Hmm that's a bit of a head scratcher, hard to diagnose without seeing everything that's going on. What I'd suggest is setting up a working copy of the site then letting an EE pro login to see what's happening. – Bluedreamer Sep 1 '20 at 16:41
  • I'm sorted, I was missing the category_id tag within my channel entries tag. Thanx for trying to help, appreciate it. :) – Tee Sep 1 '20 at 19:57
  • Oh well found, glad you got it sorted. – Bluedreamer Sep 2 '20 at 12:35

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.