/>PHP
function posts_for_current_author($query) {
global $pagenow;
if( ‘edit.php’ != $pagenow || !$query->is_admin )
return $query;
if( !current_user_can( ‘manage_options’ ) ) {
global $user_ID;
$query->set(‘author’, $user_ID );
}
return $query;
}
add_filter(‘pre_get_posts’, ‘posts_for_current_author’);
/>
/>
/> Visit wpsnipp.com for details on how to setup this WordPress snippet.
/>
/> Share this post. Facebook | StumbleUpon | Delicious | Tweet It | Digg This | DesignBump-It | DesignPoke-it
/>
/>






















0 Comments
You can be the first one to leave a comment.