Support

Account

Home Forums General Issues Show field value before update Reply To: Show field value before update

  • I suspect the issue is with the logic you’re using in the template itself. Let’s say the field is called “enable_sidebar” and the options are “enable” & “disable”. Existing posts will not have any value stored for the field “enable_sidebar” until you re-save them, so you need to count the scenario of having no value as equivalent to “enable”.

    Something like this should do it:

    
    if (!get_field("enable_sidebar") || get_field("enable_sidebar") == "enable") {
    
    //sidebar here
    
    }