Post Pay Counter

The best way to pay authors on WordPress

  • Features
    • Addons
  • Cart
  • PRO version
  • Addons
  • Support
  • Tutorials
    • Questions and Answers
    • Developer documentation

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.

1
2
3
4
5
6
7
8
9
/**
* Exclude post status and post type from BuddyPress stats table
*/
static 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:

1
$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?

Connect on Facebook

Follow the Post Pay Counter page on Facebook to be up-to-date with discounts and latest releases!

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

This site uses cookies, as all sites on the planet do -- More info