samedi 25 avril 2015

Accessing $_POST data in functions.php from a template file after it's been sent via ajax (wordpress)


I am able to retrieve data sent via ajax in functions.php. But I need that data in template.php (of my theme). This is my first time using ajax and maybe I'm going about it the wrong way. I am able to echo $_POST['myvar']; within the functions.php (I will be posting the code once back to work). Assuming the setup is correct, can I access the ajax data outside of the functions.php? Btw, I just signed up here at Stack as well, so if failed to follow some procedure, I apologize.


Aucun commentaire:

Enregistrer un commentaire