I wish to create a wordpress plugin, which i uses for many jQuery AJAX loading of table data.

I've got a function that prints the information properly, but how do you "hook" right into a specific url?

Like say, I would like the function to become run, and also the data to become printed each time a request to /mycustomplugin/myurl.php operates? (Please be aware the url/file shouldn't exist)

I've no training with Wordpress plug ins.

Should you desired to return regular wordpress data you can just include wordpress-blogheader.php to your custom php file like so


//Include Wordpress 
define('WP_USE_THEMES', false);
require('Your_Word_Press_Directory/wp-blog-header.php');
query_posts('showposts=10&cat=2');

Only use regular theming tags to come back this content you would like. This

Where's your table data originating from though? Are you currently attempting to show these details around the admin side or even the viewer side?

Also see for any full introduction to calling hooked functions with wordpress_ajax http://codex.wordpress.org/AJAX_in_Plugins

An easy

if ($_SERVER["REQUEST_URI"] == '/mycustomplugin/myurl.php') {
  echo "<my ajax code>";
}

Should work miracles.