ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Limit status in stats {total_entries}? I want to exclude closed entries.

July 07, 2010 1:36am

Subscribe [2]
  • #1 / Jul 07, 2010 1:36am

    benek

    189 posts

    I’m using this code to count total number of entries on my site:

    {exp:stats weblog="not pages|ads|blog|shop|events" status="Open|Featured"}{total_entries}{/exp:stats}

    But as I’ve quickly realized this tag doesn’t actually loop through entries and therefore the status= param is not supported.

    I need to way to count total entries but only count entries with certain statuses (because who wants to know about closed or draft entries right?).

    Any ideas? Can I do it with the weblog loop?

  • #2 / Jul 07, 2010 1:49am

    John Henry Donovan

    12339 posts

    benek,

    By default the Stats module does not count from entries that have a Closed status.

    Does that help?

  • #3 / Jul 07, 2010 1:51am

    benek

    189 posts

    Interesting. It giving me a number higher than I expected so I assumed that was because it was counting closed entries. Maybe I’ve got more entries than I think!

  • #4 / Jul 07, 2010 2:16am

    John Henry Donovan

    12339 posts

    benek,

    You can always do a recount if you think things are off.

    CP Home ›  Admin ›  Utilities ›  Recount Statistics

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases