Hi!
I’m suddenly getting the following PHP error in the functions.php for my theme.:
PHP message: PHP Fatal error: Call to undefined function register_options_page()
We haven’t updated WordPress or the plugin itself to cause the problem.
I’ve tried using the following function instead, but that didn’t help eiter;
acf_add_options_sub_page()
In the functions.php the code look like this:
register_options_page(‘Kontor-tider’);
What can I do to fix this?
Thanks!
Best regards
Mark
Hi @compell
Sounds like an update has happened from a much older version of ACF which used to use a function called ‘register_options_page’.
Can you please use the function here:
http://www.advancedcustomfields.com/resources/functions/acf_add_options_sub_page/
If this is not defined, then perhaps the issue is that your add-on is not loading by the time you run the code. Are you including the add-on in a theme? Or is it a normal plugin?
Thanks
E
Hi Elliot,
Thank you for the quick response!
I seems that the Options Page add-on isn’t installed, did the register_options_page work without that add-on previously?
I didn’t develop the website, I’ve just taken over the development, so I’m trying to get a hang of it all.
Thanks!
Hi @compell
Perhaps in an earlier version of ACF, the register_options_page function did exist in the core plugin, however the options page functionality would not have existed, so nothing would have happened.
Thanks
E