Home Forums General Issues Adding new field setting


Adding new field setting

  • I added a new field setting with this function (from the documentation)

    function my_admin_only_render_field_settings( $field ) {
    acf_render_field_setting( $field, array(
    'label' => __( 'Admin Only?', 'my-textdomain' ),
    'instructions' => '',
    'name' => 'admin_only',
    'type' => 'true_false',
    'ui' => 1,
    ), true ); // If adding a setting globally, you MUST pass true as the third parameter!
    add_action( 'acf/render_field_settings', 'my_admin_only_render_field_settings' );

    I want the new settings to appear only on a specific field group. How should I proceed? I tried a few different things without success.

    (as a side-question, less important: is there a way to determine the position of the new setting?)

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.