wordpresswordpress-themingredux-framework

Create a new custom field option in redux wordpress framework


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.


Solution

  • 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:

    1. Extension Loader
    2. Redux Options Config File

    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!