I have some js running in frontend.js which seems to run in the wordpress backend when editing the page using the divi builder. This is not even the visual builder via the frontend, this is the backend.
Is there a way to only run JS in the front end?
Just so you know that I have tested this, I have added an alert in frontend.js:
alert('frontend.js loaded');
This line is nowhere else. And when I edit the page in the backend, I see the alert. I do not want any JS to be running when editing the page via the backend. Is there a way to check if its the front end?
I have some js running in frontend.js which seems to run in the wordpress backend when editing the page using the divi builder. This is not even the visual builder via the frontend, this is the backend.
Is there a way to only run JS in the front end?
Just so you know that I have tested this, I have added an alert in frontend.js:
alert('frontend.js loaded');
This line is nowhere else. And when I edit the page in the backend, I see the alert. I do not want any JS to be running when editing the page via the backend. Is there a way to check if its the front end?