Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wordpress integration - plugins with JS #116

Closed
ryandc opened this issue Feb 22, 2019 · 5 comments
Closed

Wordpress integration - plugins with JS #116

ryandc opened this issue Feb 22, 2019 · 5 comments

Comments

@ryandc
Copy link

ryandc commented Feb 22, 2019

Apologies if this has been brought up in another thread, but I couldn't see the same sort of usage (or at least a solution).

Guessing this is a fairly common issue to encounter, but I've got my WP site working with Swup, where all my JS inits again on contentReplaced, but any wordpress plugins don't work after navigating away from the initial page you hit the site on.

Is getting this to work going to be dependant on each plugin having some sort of accessible event I can re-init, or is is there anything Sup offers?

Thanks in advance

@gmrchk
Copy link
Member

gmrchk commented Mar 1, 2019

Hi @ryandc , sorry for the delay.

I believe any plugin should have some kind of method that initializes it, and it's only a matter of debugging the code injected by the plugins to see what it is.

Checking the plugin documentation or contacting the plugin support should be the quickest way to get to the bottom of it.

In the worst case, there is always an option to rerun a whole loaded JS file/JS inline script, like the merge head plugin does.

@gmrchk
Copy link
Member

gmrchk commented Mar 1, 2019

#117 seems to be a related issue and solution kind of confirms what I was saying.

@ryandc
Copy link
Author

ryandc commented Mar 13, 2019

Thanks @gmrchk, appreciate the response and that it's beyond the remit of the plugin.

I took your advice and delved into the plugin and found a function I could init :)

@gmrchk
Copy link
Member

gmrchk commented Mar 18, 2019

@ryandc Glad I could help. If you could post the code/solution you used for future reference, it would be awesome!

@gmrchk gmrchk closed this as completed Mar 18, 2019
@zkingdesign
Copy link

@ryandc could you share your solution? Having the exact same issues as you do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants