redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Can't get the custom option panel to appear

Open jezh opened this issue 12 years ago • 6 comments

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.

  1. 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.
  2. In the functions.php I include the sample config by adding require_once(dirname(FILE).'/sample/sample-config.php');
  3. I change the value of the 'opt_name' variable to something unique.
  4. 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

jezh avatar Apr 15 '14 10:04 jezh

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.

Bucur avatar Apr 15 '14 14:04 Bucur

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 avatar Apr 15 '14 15:04 jezh

@jezh works the same. The plugin just overrides your embedded Redux Framework and away you go. Just make sure the plugin is activated. ;)

dovy avatar Apr 15 '14 15:04 dovy

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...

jezh avatar Apr 15 '14 17:04 jezh

Upgrade to the code from this repo, not wp.org

kprovance avatar Apr 15 '14 21:04 kprovance

Yea. We're going to do a push of the new Redux hopefully the end of this week. It will resolve the issue. ;)

dovy avatar Apr 15 '14 23:04 dovy