I don't seem to be able to use ExpressionEngine's native {exp:channel:category_heading} feature in combination with GWcode Categories.

I would like to display a simple category results page which displays all entries within a particular category, with the category name at the top as a page header. There will also be a list of all the categories in the sidebar (which I'm using GWcode for).

My code, simplified:

<!--Page heading-->      

<!--List of all the categories-->
<ul class="tags">
    {exp:gwcode_categories channel="project|miscellany" entry_count="yes" orderby="entry_count|cat_name" sort="desc" style="linear"}

<!--Results of selected category-->
{exp:channel:entries channel="project"}
    <img src="{project_thumbnail}" />

The only bit that doesn't work is the page heading. Does anyone know why this might be?


1 Answer 1


That's one of the limitations of native category handling in EE. You can grab it with some PHP but even easier is to use Low Seg2Cat which is to remedy this type of case.

You can simple use {segment_n_category_name} to output the category name from the segment in the URL where it is displayed. So if you have a URL such as:


You can then output the category heading with:


It is certainly very useful when working within the limitations of the native EE category handling.

EDIT: Updated to show an alternative method using the Query Module.

{exp:query sql="SELECT cat_name FROM exp_categories WHERE cat_url_title = '{segment_3}'"}



Something like that should work if you didn't want to use Seg2Cat specifically. Just be sure to swap out {segment_3} with whatever segment variable contains your category URL title.

  • Hi @Ian. Thanks for this – it works well. It is a shame there isn't a way to do it without an add-on though. Commented Apr 22, 2013 at 12:17
  • 1
    Technically you can. I'm not entirely sure on the use case but you could use the Query Module to run the query directly. I've updated my post to add this example. The query should work but I've not tested it in templates.
    – Ian Young
    Commented Apr 22, 2013 at 16:44

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.