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.

Read More

Any suggestions is most appreciated.

Related posts

Leave a Reply

2 comments

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

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

    Be sure to replace OPT_NAME with your opt_name and FULL PATH with the full path to your extension(s) location.