post → getViews
Get the post view count.
This function relies on the views meta key, which is also used by the WP-PostViews plugin. Atom will only log post views if this plugin is not installed and if the ATOM_LOG_VIEWS constant is set to TRUE.
You should be aware the logging post views on a site with large traffic can slow down your website, since each new visit triggers a database update query.
Description
int atom()->post->getViews()
Example
<?php atom()->nte('This post has %s view', 'This post has %s views', atom()->post->getViews(), atom()->post->getViews()); ?>
Last revision 12 years