PJAX Real life examples

EDIT: Figured it out (See comment below)… I was overdoing things :slight_smile:

Hey Daniele,

I’m a little lost when it comes to reinitialising plugins with pjax.

I completely understand why you can’t provide support for 3rd party plugins, but would love some real life examples of how to reinitialise them via the compatibility tab.

It would be really useful to see how things like BricksExtras sliders can be reinitialised (:grimacing: yeah, okay, this might be seen as a shameless call for help with a specific 3rd party plugin, just like you said you couldn’t provide, thinly disguised as a request for generic advice :person_facepalming:) so that we can extend that knowledge to other 3rd party plugins.

My experiments so far have led me to using Query monitor for WordPress which brings up a list of scripts that are being called on pageload…

But I don’t understand how to get this working in the compatibility tab.

Would it be possible to add examples to the docs page?



After a renewed attempt, I had success reinitialising the BricksExtras slider!

For anyone else reading:

  1. Install Query monitor and load your page on the front-end.

  2. Click on the “scripts” tab on the Query monitor popup window, and look for any mention of the plugin/function you’re looking to reinitialise.
    (in my case, I was looking for “x-slider”, which you can see 3 up from the bottom of the screenshot above)

  3. Click on the relevant link to the script itself

  4. Look for something relevant to the function you want to call. In my case, it was: “function xProSlider()” and was right at the top of the script page.

  5. Copy just that into the compatibility tab, with a semicolon afterwards, like so: xProSlider(); (EDIT: Without the "function bit)

  6. Hit save, and go check if it worked!

I’m still having trouble with a couple of other, weirdly written functions, but I think this should work for most stuff!

EDIT: So far, I’ve had success with:

BricksExtras pro slider: xProSlider();
BricksExtras pro tabs: xTabs();

I’ll keep this comment updated as I find more :slight_smile:


Amazing :clap:t3:

1 Like

Ahh I feel pretty silly.
Spent ages trying to figure it out with a bunch of complex stuff from GPT and elsewhere, and the very second I post a feature request, the next attempt succeeds :sweat_smile:

Unless you have a better suggestion, I’ll set up a forum post in a few days with all the functions I’ve had success loading, and how to do it.

Very happy chappy today :slight_smile:

The community would love you for that :slight_smile: And to answer your main question: Yes, I definitely plan to create a video with some real life examples and common plugins :slight_smile: Just to get an idea.

1 Like