Tips on Customizing AMP for WP – Accelerated Mobile Pages

How to Hide Accelerated Mobile Pages Admin Menus

function plt_hide_accelerated_mobile_pages_menus() {
	//Hide "AMP".
	//Hide "AMP → Setup".
	remove_submenu_page('amp_options', 'amp_options&tab=1');
	//Hide "AMP → Settings".
	remove_submenu_page('amp_options', 'amp_options&tab=2');
	//Hide "AMP → Design".
	remove_submenu_page('amp_options', 'amp_options&tab=19');
	//Hide "AMP → Extensions".
	remove_submenu_page('amp_options', 'amp_options&tab=30');
	//Hide "AMP → Upgrade to Pro".
	remove_submenu_page('amp_options', 'amp_options&tab=31');
	//Hide "AMP → Documentation".
	remove_submenu_page('amp_options', 'amp_options&tab=32');
	//Hide "AMP → Import / Export".
	remove_submenu_page('amp_options', 'amp_options&tab=33');

add_action('admin_menu', 'plt_hide_accelerated_mobile_pages_menus', 11);

Where do I put this code?

How to Hide Accelerated Mobile Pages Meta Boxes

function plt_hide_accelerated_mobile_pages_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {

	//Hide the "Show AMP for Current Post?" meta box.
	remove_meta_box('ampforwp_title_meta', $screen->id, 'side');
	//Hide the "AMP Page Builder" meta box.
	remove_meta_box('pagebilder_content', $screen->id, 'normal');
	//Hide the "Custom AMP Editor" meta box.
	remove_meta_box('custom_content_editor', $screen->id, 'normal');

add_action('add_meta_boxes', 'plt_hide_accelerated_mobile_pages_metaboxes', 20);