Loading JS in child theme

Posted in: Newsmag
Post count: 18

Hi,
I am using a plugin which auto block any script/iframe on the website if the user does not give the consent to the cookie policy. However, also the javascript files in the Newsmag/js folder are now blocked.
In order to not block them I would need to add a comment in each js file with a specific keyword.

Now I would like to do that by using the child theme. Is there any way to do that or should I just update the files and then remember to add again the custom line in case of a theme update?

Thanks

Post count: 20688

Hi,

The theme javascript can’t be modified in a child theme, you could add your code in the main theme javascript. The javascript files the theme uses are in the js folder
https://www.screencast.com/t/65tBOyLu
The javascript is modified in almost every update by us, so even if it would be possible with a child theme, you would still need to update the file.

Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newsmag’ is closed to new topics and replies.