I think I’m going crazy. I have a script in the footer that looks like this <script type="text/javascript" id="inline-script-1-js-after">. Inside, there’s some JS code. I actually used that JS code before on one page, but it’s been deleted and I can’t find it anywhere on the site, but it’s still in the footer.
Is it possible that Pinegrow somehow automatically adds it? I’m not using any Code Snippet plugin.
I’m 99.99% sure that I’m the problem here, but I simply can’t find this code anywhere.
@matjaz It turns out that the script is enqueued by Pinegrow in functions.php, but I don’t remember enqueuing anything. I used the code on one page inside <script> tags, but then it was deleted. Is there a way to somehow remove it from functions.php? Regenerating it didn’t help.
To add to this, Adryan is running the WordPress plugin. The desktop version doesn’t enqueue it unless you activate Interactions, but I suspect the plugin works a bit differently.
I’d like to clarify that the script doesn’t come from Interactions. The enqueued JS code was created by me, but it was only used inside <script> tags on a page and later deleted. Now the script is nowhere to be found, so I can’t remove the “enqueue” action.
Inline script tags (our own or automatically injected when activating interactions on the page), when exported, are automatically enqueued and added as inline script (in the desktop app, wondering if it’s different with wp plugin).
So, in your case, if you removed that <script type="text/javascript" id="inline-script-1-js-after"> tag from your page, then it should also be removed off the functions.php automatically, which doesn’t seems to. Did I understand this correctly?
The easiest way to fix this in the desktop app, is to clear the current theme/plugin folder PLUS also delete the local _pgexport folder, and do a fresh export.
I’m not sure about how to achieve the same in WP plugin, will probably wait for someone from the community to advise.
That said, the export should automatically add and remove inline-scripts, without the need to delete _pgexport, clear and re-export the theme/plugin. But, I will probably wait for WP pros in the community to confirm this.
Based on what I observe, the situation is more intricate. The project was initially developed using the desktop version and then transferred to the plugin.
@Adryan
Ongoing investigations.
Based on my initial findings, it may be beneficial to review/adjust (remove the unwanted things) the original project from Pinegrow desktop, then reimport it - as a new project - into the plugin with the necessary modifications.
Then I’m deeply sorry if my first impression was wrong but was the project fully created within the plugin or did you import an existing HTML template to start the project?
Then I guess I was misled by the apparent complexity of the template content. Please accept my apologies for the initial (early morning) misunderstanding.