Support » Plugin: Pageviews » When using Infinite scroll page views didn’t show

  • Resolved olziinaa

    (@olziinaa)


    Hello.
    Thanks for the awesome plugin.
    I am wordpress developer and using your plugin on my custom theme.
    I have one problem with your plugin. When i use infinite scroll, can’t print post views number. How can i show it?
    Please help me.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gennady Kovshenin

    (@soulseekah)

    Heyo 🙂 Support for you infinite scroll can be added in a similar fashion to how it works with Jetpack’s Infinite Scroll feature https://github.com/pressjitsu/pageviews/blob/master/pageviews.js#L73

    Just listen for the event and trigger. Let me know if this doesn’t work with some specific code that you’re using. Cheers.

    Thread Starter olziinaa

    (@olziinaa)

    Hello.
    I’ve added it on infinitescroll load event. It works fine.
    Thanks for your quick reply.

    $grid.on( 'load.infiniteScroll', function( event, response, path ) {
        $(document).trigger('pageviews-update');
     });
    • This reply was modified 3 years ago by olziinaa.
    Plugin Author Gennady Kovshenin

    (@soulseekah)

    Noice! 😉

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘When using Infinite scroll page views didn’t show’ is closed to new replies.