Support

Account

Home Forums Backend Issues (wp-admin) How to add ACF fields to my custom admin page Reply To: How to add ACF fields to my custom admin page

  • Hi,

    I just had the same problem and found out that you can call the following ACF functions manually, since no ACF location rule can be applied in this case, to render ACF fields in a custom admin page:

    1) Load ACF JS (Ref: https://github.com/wp-premium/advanced-custom-fields-pro/blob/master/includes/assets.php#L589)
    acf_enqueue_scripts();

    2) Render ACF fields (Ref: https://github.com/wp-premium/advanced-custom-fields-pro/blob/master/includes/acf-field-functions.php#L570)

    $fields = acf_get_fields('your_group_key');
    acf_render_fields($fields);

    I hope this helps!

    Claudio