Title: count post
Last modified: February 2, 2025

---

# count post

 *  [johnfkirk](https://wordpress.org/support/users/johnfkirk/)
 * (@johnfkirk)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/count-post/)
 * Hello:
 * I wanted to ask you a question:
 * My site:
 * masacritica.net
 * Currently runs the covernews pro theme.
 * The posts have a view counter.
 * Since I use the SiteGround speed optimize plugin, specifically the caching, this
   counter does not work or works poorly.
 * If I exclude the posts it works again. But it limits me too much in caching.
 * Is there any way to exclude only that counter?
 * I await your response, I soon have to renew the purchase of the theme for another
   year and I depend on your response.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcount-post%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [AF Support Team](https://wordpress.org/support/users/afhelpteam/)
 * (@afhelpteam)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/count-post/#post-18280677)
 * Hello,
 * Thanks for using our theme.
 * The post-view counter usually works in two ways:
    1. Counting on each reload.
    2. Counting after scrolling the post.
 * You can choose one of these options and also enable or disable the function by
   following these steps:
   **Appearance > Customizer > Theme Options > Global Settings
   > General Options**
 * Here, you should find the relevant settings for the post-view counter.
 * If the caching from the SiteGround Speed Optimizer is affecting the counter, 
   you may need to exclude only the counter script from caching instead of the entire
   post. If you need further assistance, please let us know.
 * Best regards,
 *  Thread Starter [johnfkirk](https://wordpress.org/support/users/johnfkirk/)
 * (@johnfkirk)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/count-post/#post-18281439)
 * Thank you very much for answering.
   What I have been trying to do is just exclude
   the counter script, but I have not been able to locate it.Speed ​​Optimizer gives
   me the option to exclude links. Or by type of publication, such as post. The 
   latter excludes the entire post, which would be like not using the cache directly.
   The other option is to use filters, in funtion.php of the active theme, but I
   do not know which is the script to exclude.
 * I have tried with this filter in funtion.php but it does not work:
 * add_filter( ‘sgo_bypass_cookies’, ‘add_sgo_bypass_cookies’);
   function add_sgo_bypass_cookies(
   $bypass_cookies ) {// Add the cookies you need to bypass the cache.$bypass_cookies[]
   = ‘cfz_google-analytics_v4’;$bypass_cookies[] = ‘cfzs_google-analytics_v4’;$bypass_cookies[]
   = ‘wp-settings-2’;$bypass_cookies[] = ‘wp-settings-time-2’;$bypass_cookies[] 
   = ‘moove_gdpr_popup’;
 * So the key questions are:
   1.- What is the script?2.- How do I exclude it, with
   what type of filter?3.- From where?
 *  Thread Starter [johnfkirk](https://wordpress.org/support/users/johnfkirk/)
 * (@johnfkirk)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/count-post/#post-18284357)
 * Hello:
   The first thing I did was connect to the server, which is also the creator
   of the speed optimizer plugin, and they told me to connect to you, the creators
   of the theme, since the counter is integrated into the theme.
 * Can you please tell me which script is the one to apply a filter?
 * Thank you 
 *  Thread Starter [johnfkirk](https://wordpress.org/support/users/johnfkirk/)
 * (@johnfkirk)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/count-post/#post-18303892)
 * Hello: I have updated the theme, I have emptied the cache, but the counter still
   does not work correctly with the cache enabled

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘count post’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/covernews/6.1.5/screenshot.png)
 * CoverNews
 * [Support Threads](https://wordpress.org/support/theme/covernews/)
 * [Active Topics](https://wordpress.org/support/theme/covernews/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/covernews/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/covernews/reviews/)

## Tags

 * [count](https://wordpress.org/support/topic-tag/count/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * 4 replies
 * 2 participants
 * Last reply from: [johnfkirk](https://wordpress.org/support/users/johnfkirk/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/count-post/#post-18303892)
 * Status: not resolved