I have set a variable “id_ajax” inside php loop of wordpress, but I can’t seem to pass that variable to the ajax javascript code. The whole point of doing this is to reduce the code length by using a variable instead of having the code repeated for each instance of ajax.
Tried this without luck; it displays nothing:
Edit: my php code gets truncated, how do I post it here? For now I will describe it: defined a variable in javascript that is set to the echo of the php variable.