WP for Wordpress

Remove edit, view, trash and quick edit links within custom post type



Adding this snippet to the functions.php of your wordpress theme or your plugin will remove the edit, view, trash and quick edit links that you see when you mouse over a post type list.


add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );
function remove_row_actions( $actions )
{
    if( get_post_type() === 'your_post_type' )
        unset( $actions['edit'] );
        unset( $actions['view'] );
        unset( $actions['trash'] );
        unset( $actions['inline hide-if-no-js'] );
    return $actions;
}
 
you can replace your_post_type with your preferred post typle like books, videos.. 


Responses

0 Respones to "Remove edit, view, trash and quick edit links within custom post type"

Post a Comment

AddThis

 

Recent Comments

Return to top of page Copyright © 2014