How to Add custom JS file to redux framework ?
daghash opened this issue · comments
daghash commented
How to Add custom JS file to redux framework ?
Is there any method similar to add_panel_css() but for js scripts ?
Kevin Provance commented
You would use the same concept and load your JS file instead.
$opt_name = 'OPT_NAME'; # TODO - Replace with your opt_name
function add_panel_js() {
wp_enqueue_script(
'redux-custom-js',
'http://urltomyfile',
array( 'redux-js' ),
'your-project-version',
true
);
}
// This example assumes your opt_name is set to OPT_NAME, replace with your opt_name value
add_action( 'redux/page/' . $opt_name . '/enqueue', 'add_panel_js' );