Instructions
Place one of the following:
<script src="https://cdn.jsdelivr.net/gh/arvgta/ajaxify@8.2.9/ajaxify.min.js"></script>
OR
<script src="https://4nf.org/ajaxify.min.js"></script>
OR
<script src="https://mysite.com/ajaxify.min.js"></script>
… in the head. Then, include the plugin as described on interface.
Google Analytics Setup
Please use this snippet, replacing both occurences of the ID with yours
Google Maps support
Please use HTML code along these lines
Hello,
Plugin looks great and I would really like to use it for my web radio website.
I am trying to ajaxify my wordpress website but I can’t get it to work.
– I put in the head
– I put a test.js file in /theme/assets/js which contains the following:
$(document).ready(function(){
jQuery(‘#primary’).ajaxify();
});
– I put the following in the functions.php file
add_action( ‘wp_enqueue_scripts’, ‘add_my_script’ );
function add_my_script() {
wp_enqueue_script(
‘test’, // name your script so that you can attach other scripts and de-register, etc.
get_template_directory_uri() . ‘/assets/js/test.js’, // this is the location of your script file
array(‘jquery’) // this array lists the scripts upon which your script depends
);
}
Am I missing something? (I am working on local so I have no URL)
Hi,
yes, the plugin is now plain vanilla JavaScript and so is its interface.
You can no longer use the jQuery interface.
However, there should be no problems once you have installed it properly.
Also, please appreciate that a local installation may behave differently than a “real” live one…
Hi thanks for this wonderful work.
i am sort of beginner in web development. i created my first app with and i want it to load fast when an href link is clicked without page reload. Please i just saw your plugin, i have gone through site but i dont know how to start.
i have included the plugin script. how do i make it work for the whole especially in navigation to a different page e.g from index to about page. i use php please and is it feasible. Thank you
Hi there,
thanks for your enquiry and interest in the plugin.
Well, what you have to do is follow the instructions on:
What is it exactly, that you don’t understand?
Thanks and regards,
Arvind
Hello Arvind,
yes, you are right.
I could fix the issue above, it was caused by our caching plugin – I just needed to add the new script to the exclusion list.
I wrote an email to you (@arvgta), because of sensitive data.
Thank you,
Chris
Great Plugin. Super useful for web chat applications. Thank you much.
Bro u said this site is wp, so where is the wp plugin or please give a specific tutorial on how to install it or integrate it on wp cause i have tried and searched but no way, also the plugin on github is not wp so it refuses to instal so please bro how did u made it possible on your wp site please help
Hi Kevin,
it works on the HTML of your site, therefore not biased to any CMS 🙂
Should work in WP, if your HTML is alright and the configuration of Ajaxify.
(and yes, this site – 4nf.org – was made with WP…)
Hello,
we use WordPress with elementor (header+footer are created with elementor theme builder).
We would like to ajaxify our login area (avatar+notification counter), so that it is not influenced by page cache.
1. Can we do this with your plugin?
2. Could you give me a tip for the best practice to include the script?
I need to implement this
“$(document).ready(function(){
jQuery(‘#content’).ajaxify();});”
in functions.php or external js-file for the ID I want to ajaxify, right?
But where should I add this line of code
“”
in case of using elementor (header.php gets overwritten with js css files by elementor)?
Thank you in advance,
Chris
Hi Chris,
have you read the docs on this site?
$(document).ready(function(){
jQuery(‘#content’).ajaxify();});
…that is the simplest call, yes, to ajaxify only the element with the ID content.
But from reading your enquiry, you might want to ajaxify the avatar and notification counter instead?
Cheers,
Arvind
Hello,
I am sorry, something went wrong pasting the line of code in the inquiry before:
“”
I was asking where to implement the code above in case of using elementor (header.php gets overwritten with js css files by elementor)?
My main issues are:
1) Usually you would use header.php and include it inside , like you described.
We use elementor (even for our header and footer) and as soon as I create a header.php in child-theme, our page gets blown up. That’s why I inserted those lines in child-theme/functions.php.
Screenshot: https://1drv.ms/u/s!AikSNhBAk4tevEO_e3Uqg51ylbQK
/* Load JS file for jQuery Plugin “Ajaxify” */
function js_ajaxify() {
?>
<?php
}
add_action('wp_header', 'js_ajaxify');
2) I put an enqueue script into /child-theme/functions.php and as soon as I add those lines to our script.js:
"$(document).ready(function(){
jQuery('#content').ajaxify();});"
Our page gets blown up, too (most elements don't show up anymore).
I hope this was not overwhelming – I am a coding beginner, but I try my best to learn and use your plugin.
Thank you,
Chris
Hi Chris,
can you use plugins in Elementor? On this site (4nf.org), I use an (ancient) plugin to control where to place this and that – like the Ajaxify call itself or also its inclusion in the head..
Otherwise maybe you can ask someone from your team what Elementor expects?
Thanks and
Regards,
Arvind
Thank you, Arvind.
Yes, you are able to use plugins with elementor, but sometimes easy coding adjustments can be a real horror with it. 🙂
Which plugin do you use?
I tried “Header Footer Code Manager”.
Inserting the Script-Line to load the min.js was easy and fast.
…but I don’t see a good way to implement the jquery script:
$(document).ready(function(){
jQuery(‘#ajaxified’).ajaxify();});
I will try to add it via elementor, but this will be kind of inlined code, which might not be the best choice.
So if you could describe how you did this step, it would help a lot.
I am really thankfull for your help so far,
Chris
PS: On an article I read something about conflict free mode for js, that you need to wrap this around every script.
Could this fix the issue mentioned in the post before?
jQuery(document).ready(function($) {
…
});
Hi Chris,
sure, no problem – simply wrap this:
$(document).ready(function(){
jQuery(‘#ajaxified’).ajaxify();});
in script tags…
That is the normal choice…
Hello Arvind,
thanks for the tip, I’ve done this:
https://1drv.ms/u/s!AikSNhBAk4tevEVKUV0RGtOrBdFi
Unfortunatelly I get the same result as I got while implementing it manually with an enqueue script.
Do you have an idea, why the page might break after inserting this snippet?
Thank you,
Chris
Hi Chris,
alright, then Ajaxify is actually kicking-in. I would really need more information.
Do you have a link to your (test) site? A link says a thousand words…
I’ll get back to you in the morning…
Thanks and regards,
Arvind
Is there any option so I can ajaxify a link like
$('#content').ajaxify('http://mysitelink.com/path');
I think you’re looking for the
selector
parameter, but I am a bit unsure, what you really are trying to do?Please have a look at the
selector
parameter in the interface description…