Support

Account

Home Forums Feature Requests Link to edit field groups for users/taxonomies (+ Workaround code snippet)

Solving

Link to edit field groups for users/taxonomies (+ Workaround code snippet)

    • radgh

    • May 26, 2020 at 11:53 am

    Screenshot of edit field group links in the field group title on the edit users screen

    I’m working on a site with 109 field groups, 22 post types, and 28 taxonomies. A single user has 129 custom fields by checking with a quick jQuery(‘.acf-field’).length.

    It’s very handy when editing a post type I can just click the gear in the title bar to jump to the field group. I frequently use this to get field names and keys.

    I got annoyed that there isn’t a button to edit field groups for taxonomies or user profiles. Figured I should leave an official feature request to get the “edit field group” button for field groups and taxonomies.

    I was able to add that in with a single function. It works by hooking in the “acf/pre_render_fields” filter and just dropping an element there. When jQuery has loaded, it finds those “handles” and locates the field group title (h2 tag) and creates a link to the field group. The handle is only necessarily because the h2 tags do not have any ACF information — particularly the post id of the field group.

    Of course if Elliot were to implement this, he could do it much better. But this has made my life a lot easier, so I thought I should share it.

    https://gist.github.com/RadGH/f0f8e798312837b46e0960241a9373cf

  • you should submit your feature request here https://www.advancedcustomfields.com/contact/

    • radgh

    • May 27, 2020 at 8:30 am

    I did thanks!

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.