admin管理员组

文章数量:1336380

I've implemented a simple category ajax filter using admin-ajax.php that works perfectly if the user is not logged in or if the user is logged in as an administrator. For everyone else, it calls the homepage instead of respective category archive. No errors are thrown in the console.

I made sure to use the additional nopriv hook which is why this is baffling me.

add_action('wp_ajax_nopriv_filter', 'filter_ajax'); 
add_action('wp_ajax_filter','filter_ajax');

I specifically need to make sure it works for Subscribers. Any help is greatly appreciated!

本文标签: WordPress adminajaxphp not available for subscriberscontributors