Support

Account

Home Forums Backend Issues (wp-admin) Custom User Admin Page Reply To: Custom User Admin Page

  • Hi, ReHo20. Thanks for those pointers. After posting this question I found that I could pass a post_id, or more specifically a **user id** to the acf_add_options_sub_page() function which enabled me to effectively have an options page which works for editing user meta. The steps I used were:

    – Sending the user to admin.php?page=crm-client&user=2 via a custom table of users on my plugin landing page in admin

    – Creating an options page with acf_add_options_sub_page() with post_id set to $_GET the user_id from the URL

    – I set the position to 99 and then hid that menu item with CSS so that my client wouldn’t find themselves on the Client Settings page without an id in the URL, i.e.: they can only get to it via the user table

    And it works like a charm! This was always a more desirable solution than hacking the default WP user page in admin as it gives me much more control and means that we still have that more detailed user options page at our disposal.

    Thanks again for taking the time to share your solution.