Hi,
I’m having the same issue. Not for this plugin. But i’m trying to bring back the post counter from valenti.
In their support, they told me to add the following to the childs functions.php
As I was still in build, now it seems not to work..
function my_custom_visits( $pid = '' ) {
$output = get_post_meta( $pid, 'cb_visit_counter', true );
return $output;
}
add_filter( 'zeen_view_count_custom', 'my_custom_visits' );
add_filter( 'zeen_view_count_use_jetpack_stats', '__return_false' );
But the visit counter from Valenti will obviously not continue being updated, so if you want them to carry on, you also need to add this function:
function my_custom_visits_ticker() {
if ( ! is_single() ) {
return;
}
global $post;
$pid = $post->ID;
$visits = get_post_meta( $pid, 'cb_visit_counter', true );
if ( strlen( $visits ) == 0 ) {
delete_post_meta( $pid, 'cb_visit_counter' );
add_post_meta( $pid, 'cb_visit_counter', 1 );
} else {
update_post_meta( $pid, 'cb_visit_counter', $visits + 1 );
}
}
add_action( 'wp_head', 'my_custom_visits_ticker' );
Did you get yours to work already?