I send an AJAX request from the page to the same page, in RESPONSE we get the entire source code of the page, and I only need to get the results of the PHP code on this page, how to do it?
- It is not very clear what exactly you mean by "page source code"? Do you want data not in HTML format? If so, add a GET request parameter or HTTP header, according to which the script can determine that it is an AJAX request - tutankhamun
- In general, the request to the wordpress page, in the template code there is a handler with Wordpress functions (which makes it very difficult to take out the processor to the external file to another location), I send the request from page to page, the template first shows the HTML code of the whole page, and with it - execution of the handler code takes place and data is displayed on the screen along with the page - Zhenya Danilov
- The removal of the handler from under the wing of WP is not needed. You here.stackoverflow.com/a/468272/177613 - tutankhamun
- By the way, note, your question is not very similar to your comment. As if two different questions. Try to formulate questions more fully. - tutankhamun
|