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.
Related Posts:
- Question about the way that wp_register_script works
- My scripts-bundle.js file is getting sent to the browser as a stylesheet css file. Help!
- Is it possible to access Gutenbergs reusable blocks in CPT block templates?
- Jquery in Child Theme
- How to remove “Proudly powered by WordPress” in Twenty Sixteen (2016) theme?
- Want to have the Post editor remembering the last editing position
- When does WordPress wrap inline scripts in CDATA?
- Can I share predefined fonts from theme_support with a gutenberg component?
- Add js into a theme [closed]
- What’s the proper way to include inlined javascript-source?
- Understanding Theme specific Code
- Retina JS not working
- How do I get rid of or change the footer in my child theme?
- JavaScript Files Registered in Parent Theme Won’t Load When Calling wp_enqueue_script() in Child Theme?
- Error defining a gutenberg block in a theme
- How do you approach block structured content?
- How can I add class to every quote element?
- Angular integration with homepage
- Twenty fifteen theme – change responsive menu condition
- how do i in ignore/disable/delete a javascript call from parent in child theme?
- What’s a good way to unenqueue all scripts for a single template page?
- Can “Classic Editor” plugin help to replicate the old website / theme development experience from c. 2011?
- Using JQuery to check for Rel Attribute of Image before Overriding It
- Getting a ‘slide down’ js panel implemented within WP
- On click load iframe [closed]
- How to add more default colors?
- Changing URL of scripts, scripts outside theme folder?
- How to use only scripts from new theme?
- conditional statement if wordpress theme block is empty then hide block
- Webflow Interactions on WordPress site?
- share wrordpress data between two shared hosts using REST API
- How to add extra custom social icons to page with same style?
- How to customize a section of a widget only on certain pages or page
- How to fix Gutenberg with SiteOrigin page builder deleting content when editing
- Will this js code work in a page template?
- Analytics causes website to crash
- JQuery Error in theme for .live is not a function [closed]
- Divi theme including javascript
- Should you directly edit Template Parts and Templates from themes?
- Setting colors in theme.json changes default font size and family in backend
- Help!!! Old theme doesn’t load scripts and conflitcs with plugins
- I am unable to remove “© 2022 My Blog | PopularFX Theme ” from footer [closed]
- How to remove pop up on website (css changes not visible)?
- How to replace Avatar link in profile page with upload profile pic. button using media library and display it in profile page and all wordpress site
- WordPress Editor Missing Padding and Background Color?
- Gutenberg move post/page title to Editor sidebar document panel
- Problems with the PluginDocumentSettingPanel SlotFill in Gutenberg
- understanding theme hierarchy
- Get terms of a taxonomy using useSelect
- Gutenberg richtext block vaildation failed
- How to override / customize existing Widgets?
- UnitControl – Block has encountered an error
- Newbie wordpress question re banner height
- Conditional save return on Gutenberg Block
- Gutenberg select excerpt, use generated excerpt or use more block excerpt
- Can I alter the block editor’s paste text behavior?
- Warning : Invalid argument supplied for foreach() in theme php on line 56 [closed]
- Cannot changing login button color, have tried theme, plugins… is it GoDaddy managed?
- Passing the name of selected color from the custom component to `render_callback`
- Custom Gutenberg-Block esnext pass variables
- Building a Featured Gallery component for Gutenberg
- How to trace and resolve a theme problem such as flickering links in WordPress? [closed]
- Gutenberg dependencies in package.json
- On a Https site, Css and Js Url are back to http after redirect the site
- Disable Cloudflare Rocket Loader for jQuery javascript and make it load first
- Trying to fix a website that was built with WordPress and then taken off of it
- How to integrate JSS to WordPress
- wp_enqueue_style $dep argument does nothing?
- Issue with theme mod options during domain migration
- get_the_post_thumbnail() produces different HTML on same arguments
- Getting ACF Field in Page – From the Footer
- FTP + Unable to locate WordPress content directory (wp-content)
- Download Themes From LocalHost WordPress Site [closed]
- find out reason of “Updating failed” in Post-editor
- Re-zipping or extracting theme from wordpress site files
- Posts as filtered list – expandable
- Why submenu item’s background color is not changing by css?
- How to add custom JS file in WordPress Child theme with get_theme_file_uri
- Hi everybody, I have a problem of search box
- Is a very simple theme secure enough?
- How to read inline-CSS from Gutenberg block?
- Adding the jQuery to my theme that already exists in WordPress?
- New WordPress Theme Not Showing in Blog
- Gutenberg RangeControl
- Developing the save function in Gutenberg blocks
- Custom Gutenberg block: access dom element via JavaScript
- Custom Block – save.js function not saving attributes
- Interpretation and explanation of register sidebar
- A wordpress site keeps editing wp-content files after migration
- Gutenberg – is it ok to load dependencies multiple times?
- WordPress Baskerville 2 translation
- Preventing double loading JS scripts (like React) when developing for Gutenberg
- WordPress theme logo handling (Trying to use GIF as logo)
- .PO file is found but I don’t see translations: how to debug the problem?
- SOLVED Custom Add rewrite rule and Get string
- Cannot figure out what element header color is in wordpress theme [closed]
- How to edit the font color of the H1 on a single page?
- Can I easily switch themes on a fully built website? [closed]
- How can I remove all traces of a theme?
- Javascript asset not enqueuing with the rest