Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter Fernando

    (@paradisecircus)

    Hey elliot,

    yea I manage to figure out what was causing my problem, I set a custom function to only display “own” posts for user when they wanted to edit them, here’s my function…

    function posts_for_current_author($query) {
    		global $user_level;
    
    		if($query->is_admin && $user_level < 5) {
    			global $user_ID;
    			$query->set('author',  $user_ID);
    			unset($user_ID);
    		}
    		unset($user_level);
    
    		return $query;
    	}
    	add_filter('pre_get_posts', 'posts_for_current_author');

    I’m trying to figure out why this function is causing this problem…

Viewing 1 replies (of 1 total)