• Resolved lsfoo

    (@lsfoo)


    Hi there,

    I am currently working on getting LiteSpeed Cache to work with this plugin. As it is, the post view counter will increment as expected, however, the display will not update accordingly.

    After poking around a bit, I was able to get it working.
    First, I needed to change the code added to templates per your installation instructions (instead of ‘<?php if(function_exists…’, I used a div ‘<div id=”pageviews_lscwp”> </div>’)

    Second, I needed to change your ajax request to output the results to the div, adding
    success:function(data) {
    if(data) {
    jQuery(‘#pageviews_lscwp’).html(data+’ views’);
    }
    }

    Now for my questions:
    1. Is there any possibility of this not working from a WP_PostViews point of view?
    2. If so, could you please provide an explanation as to why not?
    3. If not, I intend on providing instructions in the LiteSpeed Cache settings on how to get it to work. Do you have a standard way of detecting whether or not the WP-PostViews plugin is installed and active?
    4. May I add a section somewhere in your documentation to provide instructions for compatibility with LiteSpeed Cache?

    Thanks,
    Kevin

    https://ww.wp.xz.cn/plugins/wp-postviews/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Compatibility with LiteSpeed Cache’ is closed to new replies.