Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ajay

    (@ajay)

    There isn’t a way currently to disable this count without editing the plugin files.

    You can try this code by editing the below function around line 943 of admin.inc.php. Please backup your files before making changes.

    function tptn_column($cols) {
    if ( current_user_can('manage_options') ) {
    
      $tptn_settings = tptn_read_options();
    
      if ($tptn_settings['pv_in_admin'])      $cols['tptn_total'] = __('Total Views',TPTN_LOCAL_NAME);
      if ($tptn_settings['pv_in_admin'])      $cols['tptn_daily'] = __('Today\'s Views',TPTN_LOCAL_NAME);
    }
    
      return $cols;
    }
    Thread Starter gerobe

    (@gerobe)

    Great! Thank you.

    Maybe you can implement an option for this in the next version. Like “Show count-widgets only to admins”. This would be great.

    Thread Starter gerobe

    (@gerobe)

    Additional info:

    I just implemented that code and saw, that it removes the count columns in the post view. That’s good.

    But I also ment the widgets on the user dashboard. I saw a few lines above, there is this section “Function to add the widgets to the Dashboard.” So I wraped around the if ( _user_can('manage_options') ) there also and the widgets are gone for authors.

    So an option in a future version should have the possibility, to disable both count infos for normal authors (admin only).

    Plugin Author Ajay

    (@ajay)

    That’s a good idea. I’ll get these features on my list of things to add to the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show post count only to admin not to authors’ is closed to new replies.