Site icon Hip-Hop Website Design and Development

is_admin() returns true when utilizing admin-ajax.php from entrance finish script

Had a scenario right now the place I used to be utilizing admin-ajax.php from a entrance finish script. As I perceive it this the wp option to make ajax calls (registering my operate with the wp_ajax_nopriv_myfunction hook)

Appears to me that since admin-ajax.php is on the admin facet is_admin() returns true whereas my script calls it from the entrance finish facet.

This causes a difficulty with a plugin I exploit that does issues in another way on entrance and admin facet of issues.

So I used to be questioning if I used to be doing one thing fallacious

is there a approach to make use of ajax in entrance finish the wp approach and have is_admin() to return false ?

hope I may make myself perceive