-
Author
-
February 10, 2016 at 08:26 #103065k3mParticipant
Hi,
I’m trying to replace theme app.js with the customised version of it, copied to the child theme but when I do it I receive an error in chrome console that some of the elements are incorrect.
File is almost identical, the only change is done within accordionInfo().
Could you please advise what could be a problem and how to fix it?
Code used to load custom js script:
add_action(‘wp_enqueue_scripts’, ‘load_custom_js’);
function load_custom_js()
{
wp_dequeue_script(‘app’);
wp_enqueue_script(‘app’, get_stylesheet_directory_uri().’/assets/scripts/app.js’, array(‘jquery’));
}
Thank you
Attachments:
You must be logged in to view attached files.February 10, 2016 at 19:09 #103199RaduModeratorHi,
If you will look in source code instead of parent theme is loaded only child-theme/app.js ?or both ?
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 11, 2016 at 05:46 #103278k3mParticipantonly child theme app.js is loaded but as I mentioned before they are basically the same with only difference in one function
February 11, 2016 at 17:10 #103356RaduModeratoran if you will load identical file like in parent app.js from child theme that error persists ? or disappear ?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 18, 2016 at 18:03 #104761RaduModeratorHi,
I understand, to be clear, with parent theme activated the issue is the same ?
If yes, disable all plugins clear your browser cache and server cache if you have and check again console and let me know.
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 18, 2016 at 18:05 #104762RaduModeratorIf the error disappear enable plugins one by one to identify what causes this.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.