Exclude pages from admin pages list by ID
wordpress snippet
Adding this snippet to the functions.php of your wordpress theme will let you remove pages from the admin pages list. Just update the list of page IDs within the array.
snippet : PHPcopy
add_action( 'pre_get_posts' ,'exclude_this_page' );
function exclude_this_page( $query ) {
if( !is_admin() )
return $query;
global $pagenow;
if( 'edit.php' == $pagenow && ( get_query_var('post_type') && 'page' == get_query_var('post_type') ) )
$query->set( 'post__not_in', array(10,2,14) ); // array page ids
return $query;
}
this months featured snippets
- http://www.facebook.com/profile.php?id=100000812961482 Diana Katayama
- http://wpsnipp.com Kevin Chard
- http://www.facebook.com/profile.php?id=100000812961482 Diana Katayama











