0

I want to implement ajax on a page . i create a folder under plugins and put php page there and it works(when i gave the correct path in jquery). But when i try to call any WordPress functions it gives me error .

I want to do some database fetching in that file . How and where should i put the php file for simple ajax implementation ?

2
  • Thanks . If i need it only on the client side , is there any other preffered way ?
    – zod
    Oct 2 '14 at 20:00
  • WP handles all ajax requests through admin-ajax.php. The fact that it considers the script to be running in the 'admin' bears no relation to the origin of the request, or even if the user is logged in. Oct 2 '14 at 20:39

Browse other questions tagged or ask your own question.