I want to create new field in redux wordpress framework using Custom fields, but I can’t find any help or example using this.
i want to create a field with a switch and text field both.
Any suggestions is most appreciated.
I want to create new field in redux wordpress framework using Custom fields, but I can’t find any help or example using this.
i want to create a field with a switch and text field both.
Any suggestions is most appreciated.
You must be logged in to post a comment.
Lead dev of Redux here.
If you want to make a new field, then you should build an extension. We’ve setup two repos that will help you get started.
First:
https://github.com/ReduxFramework/extension-boilerplate
This is an extension boilerplate. It will help you see how to do this.
Second, is the extension loader:
https://github.com/ReduxFramework/redux-extensions-loader
This will load the extension. You can also use it to overload any existing Redux fields.
Be VERY careful to load your Redux options in this order:
Otherwise Redux will be initialized before you run the extension hooks to overload/add new types. From there you just call your custom field type like you would any other field.
Good luck!
In order to update the answer, it’s important to note that this page refers to the legacy method to load extensions.
The current method to load extensions is by adding the next line into redux config file (I guess is OK to add it at the end of the file).
Redux::setExtensions( 'OPT_NAME', 'FULL PATH' );
…from the docs: