Have a child theme override Customizr JS files
-
Hello
I have made some minor modifications to the /inc/js/tc-scripts.min.js file in Customizr that re-arrange the placement order of sidebars on small media screens.
At first I didn’t really know how to fix this but after some digging I found a way where I keep the modified JS file in the root of the child theme.
Could this be considered a good solution? And if so, maybe aybe someone crafty and clever to create a decent snippet for this?<?php /* Include and potentially override parent javascript file with a child theme one */ define( 'SCRIPT_NAME', 'tc-scripts' ); define( 'SCRIPT_FULL_NAME', 'tc-scripts.min.js' ); define( 'CHILD_DIR', get_stylesheet_directory_uri() ); wp_enqueue_script( SCRIPT_NAME, CHILD_DIR.'/'.SCRIPT_FULL_NAME, array( 'jquery' ), null, $in_footer = true ); ?>
Kind regards
Ludwig T
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Have a child theme override Customizr JS files’ is closed to new replies.