• I have defined a field like below in a custom post type

    $meta_boxes[] = array(
    ‘title’ => __( ‘Post Field Demo’, ‘your-prefix’ ),
    ‘fields’ => array(
    array(
    ‘name’ => __( ‘Post’, ‘your-prefix’ ),
    ‘type’ => ‘post’,
    ‘post_type’ => ‘post’,
    ‘field_type’ => ‘select_advanced’,
    ),
    ),
    );

    I have however noticed that if I permanently delete all posts, this field’s dropdown selection completely disappears but I can see its label ‘Post’. Is there a way for me to have a default placeholder value if there are no posts?

  • The topic ‘Fields of type ‘post’ do not work properly’ is closed to new replies.