4

How can I add a counter or something similar to my entries, so that I could loop through the most read articles?

2
  • 1
    There is a counter plugin that is designed to do exactly this, which is currently in private beta written by Ben Croker. Perhaps if you contact the developer, he might let you participate in the beta. – Douglas McDonald Oct 8 '14 at 16:01
  • @DouglasMcDonald Might want to post that as an actual answer ;) – Brandon Kelly Oct 8 '14 at 16:25
3

Updated: There is an Entry Count plugin that is designed to do exactly this, written by Ben Croker. Thanks Ben!

2
1

The Entry Count plugin will do this for you (previously the Counter plugin).

You can loop through the most read articles as follows:

{% set countedEntries = craft.entryCount.entries %}

{% for entry in countedEntries %}
    {% set count = craft.entryCount.count(entry.id) %}
    {{ entry.title }} ({{ count }} views)
{% endfor %}

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.