BE Stats – Change conditions under which rankings are saved

<?php
// Save all stats data, don't limit it to just posts
add_filter( 'be_stats_update', '__return_true' );
// -- OR --
/**
* Limit Stats to Events
*
*/
function be_stats_for_events( $update, $id ) {
return 'events' == get_post_type( $id );
}
add_filter( 'be_stats_update', 'be_stats_for_events', 10, 2 );
view raw functions.php hosted with ❤ by GitHub

Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk