Title: Post Display Counter
Author: Carlo Roosen
Published: <strong>9 Tháng 8, 2014</strong>
Last modified: 11 Tháng 8, 2014

---

Tìm kiếm plugin

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

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

# Post Display Counter

 Bởi [Carlo Roosen](https://profiles.wordpress.org/carloroosen/)

[Tải về](https://downloads.wordpress.org/plugin/post-display-counter.1.0.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/post-display-counter/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/post-display-counter/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/post-display-counter/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/post-display-counter/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/post-display-counter/)

## Mô tả

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.

## Ảnh màn hình

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

## Cài đặt

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)

## Hỏi đáp

  I miss feature X

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

## Đánh giá

![](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 Tháng 12, 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 Tháng
2, 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

 [ Đọc tất cả 3 đánh giá ](https://wordpress.org/support/plugin/post-display-counter/reviews/)

## Người đóng góp & Lập trình viên

“Post Display Counter” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

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

[Dịch “Post Display Counter” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/post-display-counter)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/post-display-counter/), 
check out [SVN repository](https://plugins.svn.wordpress.org/post-display-counter/),
hoặc theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/post-display-counter/)
qua [RSS](https://plugins.trac.wordpress.org/log/post-display-counter/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 1.0

First publication on 2014 August 4

## Meta

 *  Phiên bản **1.0**
 *  Cập nhật lần cuối **12 năm trước**
 *  Số lượt cài đặt **10+**
 *  Phiên bản WordPress ** 3.7 hoặc cao hơn **
 *  Đã kiểm tra lên đến **3.9.40**
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/post-display-counter/)
 * Thẻ
 * [count views](https://vi.wordpress.org/plugins/tags/count-views/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/post-display-counter/advanced/)

## Đánh giá

 5 trên 5 sao.

 *  [  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)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/post-display-counter/reviews/)

## Những người đóng góp

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

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/post-display-counter/)