Answer the question
In order to leave comments, you need to log in
Wordpress client side ajax requests?
Good afternoon.
Ajax requests are implemented for the admin panel. But it was not possible to find how to send an ajax request on the site for clients.
The maximum that could be done was to send it to the same admin-ajax.php, but I had to specify add_action('wp_ajax_nopriv_****', '****');
One more question. is it possible to implement such a mechanism for regular requests (not Ajax)?
Those. add_action('wp_info', myinfo'); to work and intercept the request to the page site.ru/info (or another URL) but not wp-admin/admin-ajax.php?action=info
Answer the question
In order to leave comments, you need to log in
The maximum that could be done was to send to the same admin-ajax.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question