jaredatch/EA-Share-Count

Request - Don't show total count if less then x.

Closed this issue · 1 comments

While the total share count provides more positive social proof most of the time, when the total share count number is low it can provide negative social proof.

Could a field be added in the backend for a "Minimum shares before showing", and a conditional inserted into the front-end code?

This is already doable using the built-in filters:

/**
 * Hide share count if less than 20
 *
 */
function ea_hide_low_share_count( $link ) {
    if( 'included_total' == $link['type'] && 20 > $link['count'] ) {
        $link['count'] = 0;
    }
    return $link;
}
add_filter( 'ea_share_count_link', 'ea_hide_low_share_count' );

That assumes you have 'hide empty' set to true.

I don't think we'll be adding a checkbox for the options page for this as the type of customization you want to make is very dependent on the specific instance. Some might want to hide shares of less than 20, while others might hide shares of less than 200. Or you might not hide the share count, but reposition the share buttons for lower share counts.