Advertisement
imranmodel32

redux framework install

Mar 8th, 2014
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2. // paste this code on functions php file
  3. // make sure that directory names are same
  4. //redux active via theme
  5. if ( !class_exists( 'ReduxFramework' ) && file_exists( dirname( __FILE__ ) . '/ReduxFramework/ReduxCore/framework.php' ) ) {
  6. require_once( dirname( __FILE__ ) . '/ReduxFramework/ReduxCore/framework.php' );
  7. }
  8. if ( !isset( $redux_demo ) && file_exists( dirname( __FILE__ ) . '/ReduxFramework/sample/sample-config.php' ) ) {
  9. require_once( dirname( __FILE__ ) . '/ReduxFramework/sample/sample-config.php' );
  10. }
  11.  
  12. // go to redus directory > sample > sample-config php file, un-comment the $args and put your theme name
  13.  
  14. function change_arguments($args) {
  15. // $args['sports'] = true;
  16.  
  17. return $args;
  18. }
  19.  
  20. // If everything is right you have successfully install the redux freamework. :)
  21.  
  22.  
  23. /*****************************************************************/
  24. // how to use redux in theme
  25. /*****************************************************************/
  26. // 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.
  27.  
  28. <?php global $redux_demo; echo $redux_demo['logo_up']['url'];?>
  29.  
  30. // text field value
  31. <?php global $redux_demo; echo $redux_demo['button-b-text'];?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement