How do I include Redux Framework in Theme wordpress?
This code doesn’t work:
<?php
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' );
}
?>
Try These Steps hope that helps
Step 1
: Download Redux framework
Step 2: Extract / Unzip downloaded redux framework files.
Step 3: Copy ReduxCore folder from extracted / unzip files into your active theme directory.
Step 4: Create New folder in your current active theme directory called functions
Step 5: Copy downloaded framework file sample-config.php from sample directory into your theme functions folder
Step 6: Rename this copied file from sample-config.php to admin-config.php
Step 7: Copy paste this code in bottom of your functions.php file.
Step 8: That’s it. Now you can see theme options in your theme.
further you can customize your /functions/admin-config.php file based on your requirements.
Reference link
For my works:
I have folder framework end in him i have ReduxCore end sample folder…check the code…
Spoiler alert, lead dev at Redux here. You could use the Redux Generator to get an admin folder and bypass some pain.
http://generate.reduxframework.com
After all, it’s a free service. 🙂
use this in functions.php
To install the reduxframework plugin you will need tgm plugin
you will get tgm plugin from here –> http://tgmpluginactivation.com/
include tgm plugin in your theme function or copy and past tgm-init.php code in functions.php , don’t forget about class-tgm-plugin-activation.php .
Example –> install redux framework plugin
force_activation–> true , will active reduxframework when your theme will active .
‘force_deactivation’ => true, will deactive reduxframework when your theme will deactive .
you can add reduxframework in theme folder , but when you will check theme by wordpress theme check you will get many error .
I already developed a theme , download and check it it will help you a lot.
http://www.nxcreation.com/alpha-nx-one/
In that link http://tgmpluginactivation.com/download/ generate plugin activation file (“class-tgm-plugin-activation.php” include the file into your theme folder) download zip file
In that file “Array of plugin arrays”
add the code
In this use for plugin path
‘source’ => ‘repo’,
Simple way to include redux framework in wordpress theme.