Support

Account

Home Forums Feature Requests Admin-only visibility on fields

Solved

Admin-only visibility on fields

  • Sometimes I add ACF fields for read-only use, like to show the number of views a post has. It would be useful to have the option of making fields visible only to administrators, or even certain accounts.

    Thanks.

  • hi @brian1037

    to show the number of views a post has >> that’s completely out of the scope of the ACF, it’s not even connected with the plugin. Probably there are actually other WordPress plugins that can do that.

    And you can make the fields visible only to administrators, check this one out:
    http://www.advancedcustomfields.com/resources/custom-location-rules/

    Cheers

  • Thanks for the link, but what I meant was that a field would only be visible to users logged in as administrators, not that a field would appear on the administrator profile page.

    I know that ACF doesn’t do view counting ;). It was a quick example to illustrate a use for an admin-only visibility field.

  • I’m planning on adding this functionality to my Validated Field add-on (or a pro version of it) in the near future.

    Thanks!

    Justin

  • Hi Brian,

    There are location rules in ACF with which you can make sure a group of fields are only visibly to an administrator.

    Location rules for admin only fields

    Personally I think that if one has time this is a perfect situation to code your own super simple Meta box. But you can also use a message field (which is obviously just read only) and modify it’s output to show your view count as plain text.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Admin-only visibility on fields’ is closed to new replies.