Skip to main content
Marc Tzjacker's user avatar
Marc Tzjacker's user avatar
Marc Tzjacker's user avatar
Marc Tzjacker
  • Member for 2 years, 11 months
  • Last seen more than 2 years ago
awarded
comment
Remove Capabilities from WP admin for specific user role
Yes, I did. Still get an error saying "critical error" I have it working, but not for each seperate post-type. For now i could live with that. Hopefully there will be a full solution somehow. Thnx
comment
Remove Capabilities from WP admin for specific user role
Hi CRavon, Unfortunately it produces a critical error. Thnx. Marc
comment
Remove Capabilities from WP admin for specific user role
Hi, Tried that, but it didn't work. I made a small alteration and changed "edit-user" for "administrator" That made it work to hide menu-links from my wsm user and keep all capabilities for administrator. It just does not apply to a specific post type, but for all the post types. add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 ); function remove_row_actions( $actions ){ if( current_user_can( 'administrator' ) ): return $actions; endif; if( get_post_type() === 'wiki-testimonials' ){ unset( $actions['view'] ); return $actions; }}
comment
Remove Capabilities from WP admin for specific user role
Hi Cravon, Thanks for your reply. I have tried your code, but this also removes my menu-links as administrator? M.
Loading…