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


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.

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.