call cmb2_get_options in functions.php
-
Hello,
I am trying to use a theme options page to include or not files in my functions.php.
But I get this : Fatal error: Call to undefined function cmb2_get_option().
I can’t understand the different answers I have found around. I guess this is because, functions.php is loaded before the plugins?This is what I need:
if ((myprefix_get_option( ‘settings_events’ ) == ‘on’)) {
require_once($tempdir .’/inc/myprefix_calendar.php’);
}Or maybe there is a better way and not include this in functions.php but can’t see where. How can I use my theme options in functions.php ?
Best regards,
Quentin
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘call cmb2_get_options in functions.php’ is closed to new replies.