I am using the {categories} tag pair to link entries to their relevant section, however, when I use the following code it does not display child categories.

{exp:channel:entries channel="section" category="{section_category_num}"}


<article class="container">
<div class="product eight columns alpha">
<div class="product_img">
<img src="{sub_section:product_photo}" title="" />
<div class="triangle"></div>
<div class="product_info">
<h4>{sub_section:categories limit="1"}<a href="/living-room/{category_url_title}">{sub_section:title}</a>{/sub_section:categories}</h4>

Since this is a section page, what I want to be able to do is to reference the related entries child category url to link to the relevant sub section.

Any guidance will be appreciated.


P.S. I did attempt to use GWCode Categories but without success.

  • Is {sub_section} a native Relationship field, and you're trying to access the categories loop which belongs to the child entry? Feb 12, 2014 at 22:51
  • Yes. That is correct.
    – forrest
    Feb 12, 2014 at 23:09

1 Answer 1


It seems like you're most of the way there - you just need to make sure you prefix everything within your child entry loop.

{sub_section:categories limit="1"}
  • Hi Derek, thanks for the response. For some reason, this code simply outputs code in between the tag pair, and does not return actual values.
    – forrest
    Feb 13, 2014 at 14:37
  • Hmm, maybe I'm wrong about the prefixing? What happens if you remove the inner prefixes (but keep the outer prefix)? Feb 13, 2014 at 14:57
  • If I do it like this: {sub_section:categories }<a href="/living-room/{category_url_title}">{sub_section:title}</a> {/sub_section:categories} I get both the parent and the child category URL title. Is there a way to only display the child URL?
    – forrest
    Feb 13, 2014 at 15:07
  • One more thought here. Without limit="" it loops through all the categories and shows the link with the parent url and then with the child url. I tried to eliminate the parent category with show="not 2", but for some reason that gets ignored. Ideas?
    – forrest
    Feb 13, 2014 at 15:12
  • Ha! that worked. I reloaded the page again and this time the show="not 2" worked. So I am good. Thanks.
    – forrest
    Feb 13, 2014 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.