I traced this back to the name of the scripts.js
JavaScript file.
My parent theme (BeTheme) enqueues the main scripts.js
like this:
wp_enqueue_script('mfn-scripts', get_theme_file_uri('/js/scripts.js'), array('jquery'), MFN_THEME_VERSION, true);
In my child theme crmpiccodotcom/footer.php
I enqueue the scripts.js like this:
// include the crmpiccodotcom child theme JavaScript
add_action('wp_enqueue_scripts', 'crmpiccodotcom_enqueue_scripts');
function crmpiccodotcom_enqueue_scripts() {
wp_enqueue_script(
'custom-script',
CHILD_THEME_URI. '/js/scripts.js',
array('jquery')
);
}
Seemingly the name caused a clash and the BeTheme used the child theme’s scripts.js
instead of it’s own, so the fix was to rename the child theme scripts.js
-> crmpicco-scripts.js
I believe the issue lies with the BeTheme, which I will take up with them, but certainly a file rename resolves this.