Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // paste this code on functions php file
- // make sure that directory names are same
- //redux active via theme
- if ( !class_exists( 'ReduxFramework' ) && file_exists( dirname( __FILE__ ) . '/ReduxFramework/ReduxCore/framework.php' ) ) {
- require_once( dirname( __FILE__ ) . '/ReduxFramework/ReduxCore/framework.php' );
- }
- if ( !isset( $redux_demo ) && file_exists( dirname( __FILE__ ) . '/ReduxFramework/sample/sample-config.php' ) ) {
- require_once( dirname( __FILE__ ) . '/ReduxFramework/sample/sample-config.php' );
- }
- // go to redus directory > sample > sample-config php file, un-comment the $args and put your theme name
- function change_arguments($args) {
- // $args['sports'] = true;
- return $args;
- }
- // If everything is right you have successfully install the redux freamework. :)
- /*****************************************************************/
- // how to use redux in theme
- /*****************************************************************/
- // call any uploded image by redux , here we have a global variable $redux_demo & ofcurse we can change the variable name. Here the global variable offer us a array & we need to put the the upload field id and the second parameter of array.
- <?php global $redux_demo; echo $redux_demo['logo_up']['url'];?>
- // text field value
- <?php global $redux_demo; echo $redux_demo['button-b-text'];?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement