• Resolved David Thompson

    (@thompsondc)


    Is it possible to add a field that is only editable by an admin? I want to assign a memberID field – that the admin must add to each registered user. I don’t want the user to edit the field. Even if i remove it from displaying on the user profile, when the user is in their profile and edits it; they then can see this field and modify it’s value.

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

    (@profilegrid0)

    Hello David,

    Thank you for writing to us.

    ProfileGrid does not support the type of field which can only be edited by admin as of now.

    Let us know if you need any further assistance.

    @thompsondc, if I correctly understend you, so I know a solution for you.
    On my site I add a field that user can see, but can’t edit.
    Administrator or another user with enough role can edit that field from user profile in console (/wp-admin/users.php).

    • This reply was modified 7 years, 4 months ago by Knyazev.

    @cchopk can you tell how you achieve it? That’s exactly what I need

    Hi, @gbagiryan!
    I did it like this:
    – at first, I installed plagin User Meta Manager. I choose this plagin for easy adding custom user meta and for shortcodes that can showing user meta on any page;
    – at second, I edited profile-tpl.php. I added my shortcodes where I want.

    You can find profile-tpl.php on this path: /yousite/wp-content/plugins/profilegrid/public/partials/themes/default/profile-tpl.php

    I showing custom meta like this:
    for current user – <td> <?php echo "[usermeta key=\"whomentor\" after_key=\"</td>\"]";?>
    for another user – </td> <?php echo "[usermeta key=\"whomentor\" user=\"{$_GET['uid']}\" after_key=\"</td>\"]";?>
    (i used </td> becouse show meta in table)
    p.s. – it’s definitely working for ProfileGrid 3.2.3 and older.
    and sorry for my English, I hope you will understend me.

    • This reply was modified 7 years, 1 month ago by Knyazev.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Admin Only Custom Field’ is closed to new replies.