WP Ajax Returns whole page content when user is not login
Posted: Fri May 23, 2014 11:59 pm
I'm using ajax to update clicks on post (post_meta). When user is logged in it works fine, but the problem is, when user is not logged in wordpress, ajax returns whole page content. instead of what I want it to return. Even both hooks for ajax have same function:
Here's my code on pastebin: http://pastebin.com/Yt1jqzWe
Any help would be appreciated.
Code: Select all
add_action( 'wp_ajax_ajax-mapsinputtitleSubmit2', 'dv_ajax_result' );
add_action( 'wp_ajax_nopriv_ajax-mapsinputtitleSubmit2', 'dv_ajax_result' );Any help would be appreciated.