• 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 to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    (@johnfkirk)

    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

    (@johnfkirk)

    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

    (@johnfkirk)

    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.