I have a custom post type that I'm just using just to keep data in but I sometimes share it with others, and I don't want any confusion when the "view" link appears in the admin column.
Is there a way of removing that?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI have a custom post type that I'm just using just to keep data in but I sometimes share it with others, and I don't want any confusion when the "view" link appears in the admin column.
Is there a way of removing that?
add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );
function remove_row_actions( $actions )
{
if( get_post_type() === 'my_cpt' )
unset( $actions['view'] );
return $actions;
}
Should see you through :)
The $actions array consists of the following:
$actions['edit']
$actions['inline hide-if-no-js']
$actions['trash']
$actions['view']
To modify users grid view 'user_row_actions
' filter can be used.
For future reference.
Is there a way to remove the "View" link under the users in the backend User panel? All users are listed with an Edit, Delete, View link. I'm looking to remove that View link. Much appreciated.