• Resolved miguel1876

    (@miguel1876)


    Hi

    When using the attribute std => ” to set a default value, it is not working. Nothing shows in the Custom Field.

    This is an example array:

    `array(
    // Field name – Will be used as label
    ‘name’ => __( ‘Test Field’, ‘restauranttheme’ ),
    // Field ID, i.e. the meta key
    ‘id’ => “{$prefix}test_filed”,
    // Field description (optional)
    ‘desc’ => __( ‘Test Field’, ‘restauranttheme’ ),
    ‘type’ => ‘text’,
    ‘std’ => ‘test text’,
    ),

    The field should show “test text” as default however it is not working. Its blank. Same goes for any other field I tried such as checkboxes.

    Can anyone help?

    Thanks

    https://ww.wp.xz.cn/plugins/meta-box/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Default value (std) not working’ is closed to new replies.