Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created November 28, 2012 15:40
Show Gist options
  • Save strangerstudios/4162053 to your computer and use it in GitHub Desktop.
Save strangerstudios/4162053 to your computer and use it in GitHub Desktop.
Hide the PMPro "Require Membership" meta box from non-admins on add/edit post screen.
/*
Hide the PMPro "Require Membership" meta box from non-admins on add/edit post screen.
*/
function hide_pmpro_meta_box()
{
if(!current_user_can("manage_options"))
remove_action("admin_menu", "pmpro_page_meta_wrapper");
}
add_action("init", "hide_pmpro_meta_box", 1);
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Hide the PMPro “Require Membership” meta box from non-admins on add/edit post screen." at Paid Memberships Pro here: https://www.paidmembershipspro.com/hide-the-pmpro-require-membership-meta-box-from-non-admins-on-addedit-post-screen/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment