is_single in admin-ajax.php request
-
What best practice to handle user location in website when ajax request via admin-ajax.php processed, (single, category, posts etc)?
Because, now its not working for me.
<? add_action( 'wp_ajax_swp_global_request', 'swp_global_request' ); add_action( 'wp_ajax_nopriv_swp_global_request', 'swp_global_request' ); function swp_global_request(){ if (is_single()){ // not working } } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘is_single in admin-ajax.php request’ is closed to new replies.