Child category article list

Here is a simple tip for creating an article list on a category page that shows not only articles in that category, but also articles in child categories.

Note that you need at least version 4.07 of Textpattern in order for the code to work.

The code

<txp:article_custom category='<txp:category_list parent=''<txp:category />'' break=""><txp:category /><txp:if_last_category><txp:else />,</txp:if_last_category></txp:category_list>' />

Place this code in your page template where you want the list of articles from your child categories to be displayed.

comments powered by Disqus