Not working on WordPress v4.7
-
After upgrading to WordPress 4.7 OptionTree is no longer working.
I am using two functions from OptionTree (ot_register_meta_box and ot_get_option). This is an example of how I am using them:
$metabox_cta = array( ... stuff here ); if(function_exists('ot_register_meta_box')) { ot_register_meta_box($metabox_cta); }
and:
<a class="navbar-brand" href="<?php echo home_url(); ?>"> <img src="<?php if(function_exists('ot_get_option')) { echo ot_get_option('logo'); } ?>" alt="Site name"> </a>
Both of these fail the “function_exists” check and produces no output. They worked just fine on WordPress v4.6.1 though.
This is how I am pulling OptionTree into my theme:
add_action('after_setup_theme', 'mytheme_setup'); function mytheme_setup() { // Load translation load_theme_textdomain('mytheme', get_template_directory() . '/languages'); // Load OptionTree require(trailingslashit(get_template_directory()) . 'option-tree/ot-loader.php'); // Load OptionTree settings require(trailingslashit(get_template_directory()) . 'assets/php/theme-options.php'); // Load meta boxes require(trailingslashit(get_template_directory()) . 'assets/php/meta-boxes.php'); ...other stuff
I am using OptionTree v2.6.0.
Please advise on how to correct this.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Not working on WordPress v4.7’ is closed to new replies.