WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've already found out here how to remove the row-actions from the posts table in wordpress admin. Now I'd like to do the same in the pages table. I've looked in the core files but, well, I just don't get it. Anyone?

Here's the code used in functions.php to remove row actions in posts:

function remove_row_actions( $actions )
    if( get_post_type() === 'post' )
        unset( $actions['edit'] );
        unset( $actions['view'] );
        unset( $actions['trash'] );
        unset( $actions['inline hide-if-no-js'] );
    return $actions;
add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );

Thanks in advance!

share|improve this question
up vote 2 down vote accepted

For non-hierarchical post types the filter is called post_row_actions, for hierarchical it's page_row_actions.

If you want to remove all actions you don't have to unset the individual items, you can just return an empty array.

add_filter( 'page_row_actions', 'wpse16327_page_row_actions', 10, 2 );
function wpse16327_page_row_actions( $actions, $post )
    if ( 'page' == $post->post_type ) {
        return array();
    return $actions;
share|improve this answer
Just an FYI, for any users who found sources that claim these hooks are deprecated (i.e. Adam Brown's hook reference - if Adam Brown has since fixed this, please comment) ... know that they are NOT deprecated. (This misleading information was borne because the regex used for parsing the WP core code was no longer able to pick up these hooks since they were moved inside a ternary operator in WP 3.1.) – Stephen M. Harris Feb 17 '13 at 18:38
Adam Brown's reference was just fixed. adambrown.info/p/wp_hooks/hook/page_row_actions – Stephen M. Harris Feb 21 '13 at 23:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.