
Extending Redux Theme Options Panel in Avada Child Theme Version 5.0
- July 28, 2017
- Leave a comment
Previously, how to extend redux theme options panel in Avada child theme was explained that works with Avada 4.0 and it’s serial versions. Now, Themefusion has released a new version of the Avada Theme (i.e. 5.0). From development perspective, this version is a major release as Theme options functional approach is completely changed in it.
If you are using Avada 5.0, you simply need to use avada_options_sections filter while adding a custom section in Theme Options panel. After that, add this callback function pt_redux_section_function() and define the custom section, its ID, label and type as per your need. Now, add the following code in your Avada Child Theme‘s functions.php file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
add_filter( 'avada_options_sections', 'pt_redux_section_function' ); /** * Adding PressTigers in Theme options page * @param array $sections * @return array */ function pt_redux_section_function( $sections ) { $sections['presstigers_user_profile'] = array( 'label' => esc_html__( 'PressTigers User Profile Settings', 'Avada' ), 'id' => 'presstigers_user_profile', 'fields' => array( 'pt_user_profile' => array( 'id' => 'pt_user_profile', 'type' => 'background', 'label' => __( 'User Profile Header Background', 'presstigers' ), ), ) ); return $sections; } |
And you are done!
Excellent tutorial!
Can you please provide details about how to retrieve the values stored in these new settings to output them as CSS to the theme?
Great tutorial, thank you!
How do I retrieve the values that are stored in these newly added options? I plan to retrieve the values and output them into a style block.
Default Redux has an ‘opt_name’ variable where all the options get stored in the database. What is Avada’s opt_name?
Thank you!