I am facing the same problem too. The screen options in the dashboard do not show the post-view plugin option. All the previous post counts on the dashboard are not visible.
Reference Image
-
This reply was modified 3 years, 5 months ago by
Pavan Kumar.
I have same problem. I have archive page where is all posts and I see 0 to every post but when I open post I see views. here is url: https://www.skystory.sk/aktuality/
If you are using a shortcode, the temporary workaround would be to use the pvc_post_views_html filter like this:
add_filter( 'pvc_post_views_html', 'custom_pvc_post_views_html', 10, 5 );
/**
* It replaces the number of views in the Post Views Counter plugin with the number of views in the
* Post Views plugin
*
* @param html The HTML to be filtered.
*
* @return the html.
*/
function custom_pvc_post_views_html( $html ) {
if ( ! function_exists( 'pvc_get_post_views' ) ) {
return $html;
}
$views = pvc_get_post_views();
$html = preg_replace( '/<span class="post-views-count">(.*?)<\/span>/', '<span class="post-views-count">' . $views . '</span>', $html );
return $html;
}
The alternative option would be to use the pvc_get_post_views() function instead of do_shortcode() and pass a post ID to it.