Post Pay Counter

The best way to pay authors on WordPress

  • Features
    • PRO version
  • Cart
    • Addons
  • Documentation
  • Support

Exclude columns from stats in BuddyPress page

November 10, 2017 by Stefano Leave a Comment

The BuddyPress addon allows you to display Post Pay Counter 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.

Below is a PHP code that allows to exclude some columns from display.

/**
 * 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 following line with the columns IDs you would like to hide:

$exclude_columns = ''; //comma separated list of columns to be excluded

Valid columns IDs 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.

[Read more…]

Filed Under: Developer documentation, Tutorials Tagged With: buddypress

Your cart

Number of items in cart: 0

  • Your cart is empty.
  • Total: €0.00
  • Checkout

What are you looking for?

Copyright © 2025 · Centric Theme on Genesis Framework · WordPress · Log in