WordPress.org

Forums

Post Views Count
[resolved] Only administrator can view? (6 posts)

  1. Mark87
    Member
    Posted 2 years ago #

    How to set that in admin part (single post or .../wp-admin/edit.php), only administrator can view stats?

    Sorry for my bad english.

    http://wordpress.org/extend/plugins/baw-post-views-count/

  2. Julio Potier
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, i added a filter in 2.19.7.
    "baw_count_views_capa_role" you can use it to modify the default "edit_posts" capability.
    Example for you:

    add_filter( 'baw_count_views_capa_role', 'baw_return_admin' );
    function baw_return_admin()
    {
      return 'administrator';
    }
  3. Mark87
    Member
    Posted 2 years ago #

    Thank you, but Editors still can see "Post Views Count" when they edit some post, for example in page .../wp-admin/post.php?post=4331&action=edit

  4. Julio Potier
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, fixed in 2.19.8, thank you!

  5. Mark87
    Member
    Posted 2 years ago #

    Thank you!

  6. arnieswap
    Member
    Posted 2 years ago #

    Hi, I also need the ability to hide post counts front non-logged in users and only Admin can see it. Where do I insert the above code?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Views Count
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.