Support

Account

Home Forums Backend Issues (wp-admin) Adding custom settings to fields – Custom Setting not appearing

Helping

Adding custom settings to fields – Custom Setting not appearing

  • Hello,

    When attempting to follow the Adding custom settings to fields guide, I’ve tried copy and pasting the action and function from the tutorial into my functions file, but the new setting does not appear when I edit a field.

    If I were to add

    add_action(‘acf/render_field_settings’, ‘my_admin_only_render_field_settings’);

    function my_admin_only_render_field_settings( $field ) {

    acf_render_field_setting( $field, array(
    ‘label’ => __(‘Admin Only?’),
    ‘instructions’ => ”,
    ‘name’ => ‘admin_only’,
    ‘type’ => ‘true_false’,
    ‘ui’ => 1,
    ), true);

    }

    To my functions, the setting for Admin Only does not appear. Do I need the pro version of ACF for these hooks to work? Or are these hooks depreciated?

  • Those hooks are only available in ACF5 (Pro for now, 5 when it gets released on WP)

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

The topic ‘Adding custom settings to fields – Custom Setting not appearing’ is closed to new replies.