I am using 'WordPress popular posts' plugin, and I'm trying to get post total views by ID using: wpp_get_mostpopular() function.

Is there anyway to achieve that? or is it even possible?


The wpp_get_mostpopular() will give you the posts with the most views. What you want to achieve is to get the post view count by passing a post id (or using it within the loop on the single page).

There is a function which accepts post id as parameter:

<?php if ( function_exists('wpp_get_views') ) { echo wpp_get_views(get_the_ID()); } ?>

You can also show views in a specific time range. Have a look at:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.