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

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

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

# Post Display Counter

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

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

 * [Details](https://zul.wordpress.org/plugins/post-display-counter/#description)
 * [Reviews](https://zul.wordpress.org/plugins/post-display-counter/#reviews)
 *  [Installation](https://zul.wordpress.org/plugins/post-display-counter/#installation)
 * [Development](https://zul.wordpress.org/plugins/post-display-counter/#developers)

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

## Description

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.

## Screenshots

[⌊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.

## Installation

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.

## Reviews

![](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/) December 3, 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/) February
8, 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

 [ Read all 3 reviews ](https://wordpress.org/support/plugin/post-display-counter/reviews/)

## Contributors & Developers

“Post Display Counter” is open source software. The following people have contributed
to this plugin.

Contributors

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

[Translate “Post Display Counter” into your language.](https://translate.wordpress.org/projects/wp-plugins/post-display-counter)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/post-display-counter/),
check out the [SVN repository](https://plugins.svn.wordpress.org/post-display-counter/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/post-display-counter/)
by [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

 *  Version **1.0**
 *  Last updated **12 years ago**
 *  Active installations **10+**
 *  WordPress version ** 3.7 or higher **
 *  Tested up to **3.9.40**
 *  Language
 * [English (US)](https://wordpress.org/plugins/post-display-counter/)
 * Tag
 * [count views](https://zul.wordpress.org/plugins/tags/count-views/)
 *  [Advanced View](https://zul.wordpress.org/plugins/post-display-counter/advanced/)

## Ratings

 5 out of 5 stars.

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

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

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

## Contributors

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

## Support

Got something to say? Need help?

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