I am trying to get it so that when a link is clicked in my WordPress template, it will load that page content with AJAX without changing the page. It needs to load dynamically into my content area depending on which link is clicked.
I have never used AJAX before so I would love it if someone could help me out or point me in the right direction.
Thanks,
Wade
Since WordPress uses Ajax by default in the admin dashboard, adding more Ajax functionality there is not difficult. If you want to use Ajax on the front end of your site, however, you will need to understand how the Ajax URL works. In WordPress, your admin-ajax. php file has a URL.
The acronym AJAX stands for Asynchronous JavaScript and XML and is used to display data on the web page and load this data in the background (on the server), without having to reload the entire page.
In WordPress, we send all AJAX request to a common URL, then wordpress internally calls the corresponding method according to the parameters which we have sent with the request. You can use the admin_url( 'admin-ajax. php' ) function of WordPress to get this url.
I was unable to get that "AJAX Page Loader 1.5" plugin to work with the latest version of Wordpress (currently 3.1.2).. so I did MUCH digging around and found this tutorial "How To AJAXify WordPress Theme" which was super easy to follow and worked like a charm!
This plugin works and will give clues to how it works: WordPress › AJAX Page Loader 1.5 « WordPress Plugins
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With