Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-26 09:10:27

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

how to display the amount of articles assigned to a category?

i’m sure this has been asked before but i can’t find anything… how can i output the amount of articles in a given category? i.e. 54 articles are assigned to category foobar, then i’d like a way to output 54. any ideas?

Offline

#2 2008-04-26 09:44:51

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: how to display the amount of articles assigned to a category?

<txp:php>echo safe_count("textpattern", "Category1 = 'foobar' or Category2 = 'foobar'");</txp:php> or one of those count plugins

Last edited by Gocom (2008-04-26 09:45:57)

Offline

#3 2008-04-26 09:48:41

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: how to display the amount of articles assigned to a category?

thank you!

Offline

#4 2008-04-26 09:50:02

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: how to display the amount of articles assigned to a category?

No problem :)

Offline

Board footer

Powered by FluxBB