Support

Account

Home Forums Feedback 5.11: Replacing get_field() with get_option() FIX

Solved

5.11: Replacing get_field() with get_option() FIX

  • A plugin we built uses a bunch of settings that entered into an ACF options page. This was throwing errors with the new update, however. So I followed the suggestion on the 5.11 update page and replaced those with get_option(), but I kept getting false when I used the same ACF field name that I was using previously with get_field().

    I checked phpmyadmin to see if the options entries were still there, and noticed that the ACF entries are saved in that table with the prefix options_. This fixed it for me!

    You might want to note that prefix in the options table for developers replacing get_field() with get_options() for any options saved in an ACF options page!

  • Yes, all options page fields are prefixed with the “post_id” value used to set up the options page.

  • …but is it get_option() or get_options()?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.