Title: Post Display Counter
Author: Carlo Roosen
Published: <strong>9 augustus 2014</strong>
Last modified: 11 augustus 2014

---

Plugins zoeken

Deze plugin **is niet getest met de laatste drie grote versies van WordPress**. 
Mogelijk wordt het niet meer onderhouden of ondersteund. Er kunnen ook compatibiliteitsproblemen
ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

![](https://s.w.org/plugins/geopattern-icon/post-display-counter.svg)

# Post Display Counter

 Door [Carlo Roosen](https://profiles.wordpress.org/carloroosen/)

[Download](https://downloads.wordpress.org/plugin/post-display-counter.1.0.zip)

 * [Details](https://nl-be.wordpress.org/plugins/post-display-counter/#description)
 * [Beoordelingen](https://nl-be.wordpress.org/plugins/post-display-counter/#reviews)
 *  [Installatie](https://nl-be.wordpress.org/plugins/post-display-counter/#installation)
 * [Ontwikkeling](https://nl-be.wordpress.org/plugins/post-display-counter/#developers)

 [Ondersteuning](https://wordpress.org/support/plugin/post-display-counter/)

## Beschrijving

Want to know how often a post is actually displayed on the actual screen?

This plugin has a javascript that is triggered when the title of a post is displayed
in the visible area of the window, either when the page is loaded or when the window
is scrolled or resized. It will not be triggered when the post is on the page but
stays outside the visual area.

There are two independent counters. The ‘displayed’ counter counts all instances
of the post, whether it is in overview pages, search pages or on its own page. The‘
viewed’ counter only counts the post on its own page. Note that ‘viewed’ this also
is counted as ‘displayed’.

The ratio between the two values can be used as a metric for the attractiveness 
of the article title, the excerpt and/or featured images that are displayed in overviews.

Both counters are triggered by javascript. This means that search bots will not 
trigger the counter. Also the rare cases a user has javascript disabled the counter
will not be triggered.

The counter values will by default be displayed above each post on its own page.
The plugin has several functions that can be used inside template files for more
control.

#### Acknowledgements

We created this plugin for http://denhaagdirect.nl, a local news and blog website
in The Hague, Netherlands. . Thanks Michael and Jeroen for letting us share this
plugin.

## Schermafbeeldingen

[⌊Default counter displayed above the content screenshot-1.png.⌉⌊Default counter
displayed above the content screenshot-1.png.⌉[

Default counter displayed above the content screenshot-1.png.

[⌊Options page screenshot-2.png.⌉⌊Options page screenshot-2.png.⌉[

Options page screenshot-2.png.

## Installatie

In the WordPress backend, search for the plugin ‘post-display-counter’. Once you
found it, activate it and you are done. In the plugin options you can choose to 
hide the counter for all posts and for posts before a certain date. You can also
hide the counter for individual posts.

The plugin might not work out of the box for all themes, in that case you will have
to modify the theme files. For instructions see below. Also feel free to send us
an email, we are happy to help.

Posts are only counted when the title is generated by the_title() function. You 
can count other instances by modifying the template files.

 add a class “countable” in the same element, add an attribute “data-served-id” 
with the post id as its value.

For example, change this:

into this:

 <h3 class="countable" data-served-id="”>

The reverse could also be needed. When you have a title that should be excluded 
from being counted, surround it with the functions count_remove() and function count_restore()
like this:

    ```
    <?php function count_remove();
        the_title();
    function count_restore(); ?>
    ```

There are 3 functions that you can use to display the counter on your page in any
format you like. In this case you probably want to disable the default counter in
the plugin options.

Display default counter:

Display counters in your own format: This post has been presented times.
 This post
has been opened times.  The open rate is times.

(note that get_counters() can be used both to display the default counter as to 
determine if the counter is visible)

## FAQ

  I miss feature X

Feel free to send us an email, if more people request the same feature we will build
it.

## Beoordelingen

![](https://secure.gravatar.com/avatar/167a47aa9aa66512f1b17c180a85803f0c852e2c613e9d272f448e22bfb3d993?
s=60&d=retro&r=g)

### 󠀁[Unnecessarily damaged the site](https://wordpress.org/support/topic/unnecessarily-damaged-the-site/)󠁿

 [deleteaccount](https://profiles.wordpress.org/chaoos/) 3 december 2018

Adds a code to the post title, which will link it to a code error.

![](https://secure.gravatar.com/avatar/a70944f706357dd53033bc786ee8180df132aff815620bfa0f47a9fa04153eb1?
s=60&d=retro&r=g)

### 󠀁[Show only to admins](https://wordpress.org/support/topic/show-only-to-admins/)󠁿

 [Scott Winterroth](https://profiles.wordpress.org/countrymusicchicago/) 8 februari
2017

Hi. Great idea! I think what would make this plugin awesome is if you could have
the stats only show to “logged in” users. I don’t really want to make the data publicly
available but I would like to know. Scott

 [ Lees alle 3 beoordelingen ](https://wordpress.org/support/plugin/post-display-counter/reviews/)

## Bijdragers & ontwikkelaars

“Post Display Counter” is open source software. De volgende personen hebben bijgedragen
aan deze plugin.

Bijdragers

 *   [ Carlo Roosen ](https://profiles.wordpress.org/carloroosen/)
 *   [ Elena Mukhina ](https://profiles.wordpress.org/pilotessa/)

[Vertaal “Post Display Counter” naar jouw taal.](https://translate.wordpress.org/projects/wp-plugins/post-display-counter)

### Interesse in de ontwikkeling?

[Bekijk de code](https://plugins.trac.wordpress.org/browser/post-display-counter/),
haal de [SVN repository](https://plugins.svn.wordpress.org/post-display-counter/)
op, of abonneer je op het [ontwikkellog](https://plugins.trac.wordpress.org/log/post-display-counter/)
via [RSS](https://plugins.trac.wordpress.org/log/post-display-counter/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0

First publication on 2014 August 4

## Meta

 *  Versie **1.0**
 *  Laatst bijgewerkt: **12 jaar geleden**
 *  Actieve installaties: **10+**
 *  WordPress versie ** 3.7 of nieuwer **
 *  Getest t/m **3.9.40**
 *  Taal
 * [English (US)](https://wordpress.org/plugins/post-display-counter/)
 * Tag
 * [count views](https://nl-be.wordpress.org/plugins/tags/count-views/)
 *  [Geavanceerde weergave](https://nl-be.wordpress.org/plugins/post-display-counter/advanced/)

## Beoordelingen

 5 van 5 sterren.

 *  [  4 5 sterren beoordeling     ](https://wordpress.org/support/plugin/post-display-counter/reviews/?filter=5)
 *  [  0 4 sterren beoordeling     ](https://wordpress.org/support/plugin/post-display-counter/reviews/?filter=4)
 *  [  0 3 sterren beoordeling     ](https://wordpress.org/support/plugin/post-display-counter/reviews/?filter=3)
 *  [  0 2 sterren beoordeling     ](https://wordpress.org/support/plugin/post-display-counter/reviews/?filter=2)
 *  [  0 1 sterren beoordeling     ](https://wordpress.org/support/plugin/post-display-counter/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/post-display-counter/reviews/#new-post)

[Bekijk alle beoordelingen](https://wordpress.org/support/plugin/post-display-counter/reviews/)

## Bijdragers

 *   [ Carlo Roosen ](https://profiles.wordpress.org/carloroosen/)
 *   [ Elena Mukhina ](https://profiles.wordpress.org/pilotessa/)

## Ondersteuning

Iets te melden? Hulp nodig?

 [Het supportforum bekijken](https://wordpress.org/support/plugin/post-display-counter/)