Meep3D
Meep3D

Reputation: 3756

Using an ajax reload with a Wordpress plugin

I am making a Wordpress plugin that provides updates in the widget section of the page - everything works fine. The one thing that doesn't is the ajax callback (using load with jquery). It appears that Wordpress is blocking direct access to the php file that I am trying to load (it is in /wp-content/plugins/myplugin).

How should I be doing this?

Upvotes: 2

Views: 1112

Answers (1)

karim79
karim79

Reputation: 342655

Can you not make a proxy script in the root of your site to get the output of that script by simply including it? e.g.:

<?php
include '/wp-content/plugins/myplugin.php';
?>

Upvotes: 1

Related Questions