Can't get the custom option panel to appear
Hi, I really, really dig the framework, but for the life of me I can't seem to make my custom option panel appear in the wp dashboard when installing Redux as a plugin.
Please bear with me as I'm going nuts here. These are the steps I'm taking to make my own config file appear in a theme when the user installs the plugin.
Redux Plugin version 3.1.9 WP version 3.8.2
As an example I'm trying to make the option panel in the twentyfourteen theme.
- I copy the sample folder with the sample-config.php from the Redux plugin directory, and paste it in the root folder of the twentyfourteen theme.
- In the functions.php I include the sample config by adding require_once(dirname(FILE).'/sample/sample-config.php');
- I change the value of the 'opt_name' variable to something unique.
- I deactivate the demo mode in the plugins area of WordPress
aaand.... Nothing happens, no option panel. Is there a step I'm missing, I've been pulling my hair for two days now searching the Redux wiki and documentation but this is all I could find.
Please, any help would be greatly appreciated.
Ivan
My code is in functions.php // load the theme's framework if ( !class_exists( 'ReduxFramework' ) && file_exists( dirname(FILE) . '/framework/ReduxCore/framework.php' ) ) { require_once( dirname(FILE) . '/framework/ReduxCore/framework.php' ); }
// load the theme's options if ( !isset( $redux_owd ) && file_exists( dirname(FILE) . '/framework/sample/options.php' ) ) { require_once( dirname(FILE) . '/framework/sample/options.php' ); } creat in theme folder name framework and upload Redux folder there.
Hey bucur, thanks for replying, That code works for me too but that’s when embedding the framework into a theme.
I wan’t to know how to display custom options when the user installs Redux as a plugin. Any thoughts?
@jezh works the same. The plugin just overrides your embedded Redux Framework and away you go. Just make sure the plugin is activated. ;)
Hi dovy thanks for the answer, I can get the option panel to appear with the above code, but as soon as I activate the plugin I get this error:
Fatal error: Call to undefined method Redux_Helpers::isTheme() in sample-config.php on line 24
Haven't changed anything in the sample-config file but the opt_name value to something else...
Upgrade to the code from this repo, not wp.org
Yea. We're going to do a push of the new Redux hopefully the end of this week. It will resolve the issue. ;)