Skip to main content
code highlighted, grammar fixes
Source Link
Pat J
  • 12.3k
  • 2
  • 28
  • 36
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;
}

thisThis code is removingremoves the view link from post list, but iI want to remove the link from post edit page also, so. Can anyone can help ?

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;
}

this code is removing view link from post list, but i want to remove the link from post edit page also, so anyone can help ?

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;
}

This code removes the view link from post list, but I want to remove the link from post edit page also. Can anyone help ?

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; }

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;
}

this code is removing view link from post list, but i want to remove the link from post edit page also, so anyone can help ?

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; }

this code is removing view link from post list, but i want to remove the link from post edit page also, so anyone can help ?

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;
}

this code is removing view link from post list, but i want to remove the link from post edit page also, so anyone can help ?

Source Link

Remove the “View” Link in Post edit Admin

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; }

this code is removing view link from post list, but i want to remove the link from post edit page also, so anyone can help ?