Support

Account

Home Forums Front-end Issues How to display default values on front end? Reply To: How to display default values on front end?

  • If this default image value, or the field itself, did not exist when you first saved the posts then you can try getting the field value by the field key instead of the field name. The issue if a field did not exist when the post was initially saved is that ACF does not know how to find the field key in order to use the default value.

    If that does not work then you need to code it into your template

    
    $value = get_field('your-field-name');
    if (!$value) {
      $value = ?? set default value
    }