Currently Browsing: Code

AJAX in WP Plugins Using jQuery

If you’ve ever programmed a plugin for Wordpress, you know what a hassle it is to connect to the WP database during AJAX requests. In this post, I will show you that you should NEVER touch the wp-config file EVER. Including the wp-config file in a plugin could possibly pose as a security hole. Here are a few simple steps to get you up and running with AJAX without having a college doctorate. We’re going to code a simple plugin using WP shortcode to display a simple form in a post or page that will return an AJAX response. 1. Register your variables with WP //Register your REQUEST...