Is it possible to display the parent category of the current entry?




Yes of course, you should use GW Code Categories. After installing that plugin, please try below code. I think it will work to get parent category.

{exp:channel:entries channel="channel_name" disable="categories|category_fields|member_data|pagination|trackbacks|relationships" dynamic="no"}
    {exp:gwcode_categories entry_id="{entry_id}" style="linear" depth="1"}
| improve this answer | |
  • 2
    GW code categories is not available in EE3 but you can make it compatible by just adding addon.setup.php file. – Mufi - Amici Infotech Dec 14 '17 at 11:17
  • 1
    Thank you both, I adjusted GW Code Categories to work with EE3 and it does just what I wanted! – greebstreebling Dec 14 '17 at 15:20

You just need to specify which field from your news channel you want to do the looking up from. See this very clear example in the EE3 documentation.

{exp:channel:entries channel="childChannel"}
  {parents field="relationship_field"}
    {parents:title} - {parents:field1} - {parents:field2}
| 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.