All Topics
Show only “mine” posts in filter
Hey,
great plugin so far!!
I am just struggling with one little problem. I use that filter to only show “mine” posts of that custom post type:
add_filter( 'views_edit-einsendung', function( $views )
{
if( current_user_can( 'manage_options' ) )
return $views;
$remove_views = [ 'all','publish','future','sticky','draft','pending','trash' ];
foreach( (array) $remove_views as $view )
{
if( isset( $views[$view] ) )
unset( $views[$view] );
}
return $views;
} );
But as soon as I set some filter, I can see all posts again. Any ideas how to make users really see only their own posts?
Thanks!
You must be logged in to reply to this topic.