Allow guest to update custom post met using ajax
There are two hooks for adding AJAX handlers, you’re missing the one for non-logged in visitors. You need: add_action( ‘wp_ajax_nopriv_adClickCounter’, ‘adClickCounter_ajax’ ); … in addition to the add_action call you currently have. Note the extra nopriv_ in the tag.