Skip to content
Advertisement

WordPress – Adding to Redux Theme Options using Child Theme

I am using a wordpress theme that has it’s own framwork which is based upon redux framework I think. I am modifying this theme using a child theme. I want to add to the Theme Options in the backend and I found a function within the files of the parent theme that seems to be exactly what I need:

JavaScript

I have added this function to my child theme’s functions.php and uncommented the add_filter. However, this does not seem to work and no new section has been added.

I came across this discussion elsewhere which suggests the name of the function needs to be changed (I was getting the same error mentioned on there). I have done that and it still won’t work.

Here is what I have in my child theme functions.php

JavaScript

I wasn’t sure if the filter name ‘redux-opts-sections-twenty_eleven’ needs editing as it mentions the twenty eleven theme. I have tried it with different theme names at the end instead of twenty_eleven and that had no effect.

Any help would be greatly appreciated! On a side note I have been able to accomplish adding new options to Theme Options by copying over the whole framwork folder into my child theme and defining the path to the framework in the child theme’s functions.php. I just felt that there should be a much slicker, neater way to achieve this and I thought that function sounded perfect.

Many thanks.

Advertisement

Answer

Lead dev of Redux Framework here. This solution only works if you’re using Redux Framework 3.1+. If you have an older version, install the Redux Framework plugin and it will override the version inside your theme.

First go to the current option panel. Open up a javascript console (use chrome or firefox) and type: redux.args.opt_name. That will echo out a name. Copy that and paste it into this function replacing OPT_NAME with the name that was echo’d out:

JavaScript

Good luck!

** UPDATE **

Also with the Redux API you can easily add a new section that way.

JavaScript

That makes it a wee bit easier using our API I believe we released in Redux 3.2…

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement