WordPress.org

Support

Support » Plugins and Hacks » WordPress Popular Posts » [Resolved] [Plugin: WordPress Popular Posts] View count empty on Custom Post Types

[Resolved] [Plugin: WordPress Popular Posts] View count empty on Custom Post Types

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Jonathan,

    Actually, the wpp_get_views method queries the wpp_popularpostsdata table to get the views count of a given post ID. The post type isn’t really neccesary here.

    Are you sure that you’re passing a valid ID to the function?

    I’ve tried:
    <?php wpp_get_views($post->ID); ?>

    And:
    <?php wpp_get_views('17'); ?> (Targetting a specific post)

    To no apparent avail.

    You need to echo it, my friend 😉

    <?php echo wpp_get_views($post->ID); ?>

    ..Nice 🙂

    Thank you for pointing that out!

    It works beautifully.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] [Plugin: WordPress Popular Posts] View count empty on Custom Post Types’ is closed to new replies.
Skip to toolbar