Post Pay Counter

The best way to pay authors on WordPress

  • Features
    • PRO version
  • Cart
    • Addons
  • Documentation
  • Support

WordPress Popular Posts plugin integration.

by

› Forums › Post Pay Counter › Support › WordPress Popular Posts plugin integration.

We are based in Europe with a GMT+1/GMT+2 time zone - support replies may be delayed due to time zone differences with your country.

  • This topic has 8 replies, 1 voice, and was last updated 3 years, 5 months ago by Stefano.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • November 23, 2021 at 10:34 am #128872
    KP
    Guest

    Is there any way to integrate the ‘WordPress popular posts’ plugin with Post Pay Counter. If yes what should be entered on plugin, postmeta or callback name field? Can you provide an addon to integrate both plugins?

    Thanks.

    November 23, 2021 at 10:43 am #128913
    Stefano
    Keymaster

    Hi KP,
    try to copy this code into your theme’s functions.php:

    function ppc_wpp_views( $post ) {
        if( function_exists( 'wpp_get_views' ) )
            return wpp_get_views( $post->ID );
        else
            return 0;
    }

    and then enter ppc_wpp_views as callback function into PPC’s visits counting.
    Let me know if it works! 🙂

    A nice day,
    Stefano

    November 23, 2021 at 10:36 pm #129070
    KP
    Guest

    Pefect! It’s working.

    Thanks, Stefano.

    November 24, 2021 at 3:20 am #129114
    KP
    Guest
    This reply has been marked as private.
    November 24, 2021 at 6:36 am #129152
    Stefano
    Keymaster

    Hi KP,
    the problem is probably that their plugin returns views from the last day by default. Try updating the code this way:

    function ppc_wpp_views( $post ) {
        if( function_exists( 'wpp_get_views' ) )
            return wpp_get_views( $post->ID, 'all' );
        else
            return 0;
    }

    Let me know!

    November 24, 2021 at 7:53 am #129171
    KP
    Guest
    This reply has been marked as private.
    November 24, 2021 at 8:17 am #129175
    Stefano
    Keymaster

    Yet one more attempt:

    function ppc_wpp_views( $post ) {
        if( function_exists( 'wpp_get_views' ) )
            return wpp_get_views( $post->ID, 'all', false );
        else
            return 0;
    }
    November 24, 2021 at 8:25 am #129177
    KP
    Guest

    Perfect! Now it’s working. Thanks again. ?

    November 27, 2021 at 11:47 am #130092
    Stefano
    Keymaster

    Great to hear! 🙂

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘WordPress Popular Posts plugin integration.’ is closed to new replies.

Your cart

Number of items in cart: 0

  • Your cart is empty.
  • Total: €0.00
  • Checkout

What are you looking for?

BEFORE POSTING

Before posting, please please please do have a look at our Documentation section. Your problem may be addressed there, allowing you to solve it without help from us :)

Copyright © 2025 · Centric Theme on Genesis Framework · WordPress · Log in