Skip to content

Instantly share code, notes, and snippets.

@ashleyfae
Last active January 18, 2017 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashleyfae/9f59abb8b2c28c484a8c8219e8582ded to your computer and use it in GitHub Desktop.
Save ashleyfae/9f59abb8b2c28c484a8c8219e8582ded to your computer and use it in GitHub Desktop.
RCP: remove the metabox from the books and page post types
<?php
/**
* Remove the "restrict this content" meta box from the "books" and "page" post types.
*
* @param array $post_types List of post types the meta box should not be added to.
*
* @return array
*/
function pippin_exclude_post_types_from_rcp( $post_types ) {
// We do NOT want the meta box displayed on the "books" or "page" post types.
$post_types[] = 'books';
$post_types[] = 'page';
return $post_types;
}
add_filter( 'rcp_metabox_excluded_post_types', 'pippin_exclude_post_types_from_rcp' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment