The stats shortcode already allows to display Post Pay Counter stats anywhere on your site. The BuddyPress addon takes this a step further, allowing to display author’s stats in the BuddyPress Member page. However, by default, all columns are displayed. This may include columns that you are not interested into, or that you may not want to show to authors. There is no user interface to exclude some columns, but it’s easy to filter them out with a short code snippet.
/** * Exclude post status and post type from BuddyPress stats table. */ function ppc_buddypress_exclude_stats_columns( $shortcode ) { $exclude_columns = ''; //comma separated list of columns to be excluded return substr( $shortcode, 0, strlen( $shortcode )-1 ) . ' exclude="'.$exclude_columns.'"]'; } add_filter( 'ppc_buddypress_stats_shortcode', 'ppc_buddypress_exclude_stats_columns' );
You should change the value of $exclude_columns
to include the columns labels you would like to hide.
Valid column labels are: post_id, post_title, post_type, post_status, post_publication_date, post_words, post_visits, post_adsense_revenues, post_images, post_comments, post_bonus, post_total_payment, post_due_payment
. You can inspect the stats table header in your browser to find out the label of a column not listed here.
As an example, $exclude_columns = 'post_id, post_type';
will hide the post ID and the post type from the BuddyPress Member page.