これを functions.php で使用します
// this will deactive demo mode of reduxframework plugin and will not display and addvertisement
if ( ! function_exists( 'redux_disable_dev_mode_plugin' ) ) {
function redux_disable_dev_mode_plugin( $redux ) {
if ( $redux->args['opt_name'] != 'redux_demo' ) {
$redux->args['dev_mode'] = false;
}
}
add_action( 'redux/construct', 'redux_disable_dev_mode_plugin' );
}
// add sample config to overwrite reduxcore/framework.php
if (!isset($redux_demo)){
require_once(dirname(__FILE__) . '/sample-config.php');
}
reduxframework プラグインをインストールするには、tgm プラグインが必要です。
ここから tgm プラグインを取得します --> http://tgmpluginactivation.com/
テーマ関数に tgm プラグインを含めるか、 functions.php に tgm-init.php コードをコピーして貼り付けます。class-tgm-plugin-activation.php を忘れないでください。
例 --> redux フレームワーク プラグインをインストールする
$plugins = array( // add below code to add redux framework plugin
array(
'name' => 'Redux Framework', // The plugin name.
'slug' => 'redux-framework-master', // The plugin slug (typically the folder name).
'required' => true, // If false, the plugin is only 'recommended' instead of required.
'external_url' => 'https://wordpress.org/plugins/redux-framework', // If set, overrides default API URL and points to an external URL.
'source' => get_stylesheet_directory() . '/plugins/redux-framework-master.zip',
'force_activation' => true,
'force_deactivation' => true,
),
);
force_activation--> true 、テーマがアクティブになると reduxframework がアクティブになります。
'force_deactivation' => true、テーマが deactive になると reduxframework を非アクティブにします。
テーマフォルダにreduxframeworkを追加できますが、ワードプレスのテーマチェックでテーマをチェックすると、多くのエラーが発生します。
私はすでにテーマを開発しました。ダウンロードして確認すると、大いに役立ちます。
http://www.nxcreation.com/alpha-nx-one/