Support

Account

Home Forums Backend Issues (wp-admin) [acf/select] missing default value if "stylised UI" is enabled Reply To: [acf/select] missing default value if "stylised UI" is enabled

  • @mmjaeger, your problem is that get_the_ID() only works inside the WP loop.

    try

    global $post;
    if ( has_term( $term->slug, 'resource_category', $post->ID ) )

    however, adding a default value to a post that already has a selected category really should not have any effect, since something is already selected, unless I’m missing something, and if it’s a new post there won’t be anything selected so there will be no default value. Like I said, maybe I’m missing it and just not understanding.