Solved.. How to hide other Directory Members posts on the admin pages

Hi guys

Spent a bit of time looking for ways to do this as, while I know logged in users can’t edit other Directory Member’s listings, I wanted to be able to hide them completely.

In the end I simply added the following code (between the php start/end) of the functions.php of the Directory theme:

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');

and voila listings from other users hidden :slight_smile: The code was taken from here:

http://wordpress.org/support/topic/how-to-hide-other-users-posts-in-admin-panel-1

I know a few others on the forum were looking to do the same so hope it’s of some use!

Best wishes!

Nick, eSanctuary