I’m trying to use Redux framework with my theme 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.
As an example I’m trying to make the option panel in the twentyfourteen theme just in case there is something wrong with mine.
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
Ahh, you’re loading within a plugin. Be sure to run your plugin code AFTER the plugins_loaded hook. You’re plugin basically is sooner in the alphabet than Redux, and thus it is not loaded by the time you try to run your code. Just wrap your init() functions inside a plugins_loaded hook and it will all work.
But when I install and activate the plugin (with the embed code still in my functions.php) I get the aforementioned Fatal Error.
On the other hand, when I just install the plugin and don’t use the embed code, but these instructions here I can’t get my custom panel to appear. The demo works fine.
I know there’s something I’m overlooking, but for the life of me I can’t figure out what XD
Ahh. That’s because you’re using the wordpress.org plugin and we haven’t updated to 3.2. That helper function was a new addition, but we keep making improvements to the code before the release. Hence, the error.
I’d suggest for Dev work on the code from the repo. We should have a release by next week alleviating all these concerns.
Yes, the plugin is from the wordpress.org. I was testing the scenario where I would ship my theme with the embedded code and the user updates or installs the plugin on his own.
But still, I don’t know why I couldn’t make the plugin (without the embed code) display my custom option panel. I could only get the demo panel to appear when activated.
No problem. Sorry we haven’t pushed the code yet. We’ve made vast improvements and I really want it perfect before it ships so it doesn’t break legacy code.