Answer the question
In order to leave comments, you need to log in
Ajax output of full news in WordPress loop?
The page is built through a query_posts cycle, one-header-links are displayed, a pop-up is attached to them. And here you need to load content into it with Ajax when you click on the title.
Actually, there is only one problem - how to correctly pass the id of the post that was clicked to the request?
Now I get it in the post output cycle, I write it to a js variable, then I send it along with an ajax request to php, I get a response, I insert it into the popup, everything is fine, except for one thing - this is always the content of the last entry of the cycle due to the fact that the variable is taken when the cycle of displaying records has already been completed, and the id of the last record remains in it. And how to be?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question