Site icon Experience Wordpress Developer Online – Design Develop and Maintenance Support

Remove edit, view, trash and quick edit links within posts admin wordpress

In WordPress Dashboard Postlist when you hover over one of the post, it will display “Edit” , “Quick Edit” , “Trash” , “View” link. If you want to Remove edit, view, trash and quick edit links within posts admin wordpress than add below line of code in your theme’s functions.php file of your active child theme (or theme) and save the file.

add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );

function remove_row_actions( $actions ){
    // Confirm post type
    if( get_post_type() === 'post' ){
        unset( $actions['edit'] );
        unset( $actions['view'] );
        unset( $actions['trash'] );
        unset( $actions['inline hide-if-no-js'] );
    }    
    return $actions;
}
Exit mobile version