• Is there a way to allow contributors to see only their own post and edit while disallowing them to do anything else?

    I’ve been looking around for a solution but the closest one is http://www.kpdesign.net/wp-plugins/wp-hide-dashboard provided but it is not what I’m looking for.

    I want contributiors to view their post only (by default they can view all posts by other authors as well) and edit their own profile.

    Any solution?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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');

    put this in functions.php

    I tried this and it just gave blank pages. I’ll keep looking…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to allow contributors to view/edit their own posts only’ is closed to new replies.