Tips on Customizing SEOPress – On-site SEO

How to Hide SEOPress Admin Menus

function plt_hide_wp_seopress_menus() {
	//Hide "SEO".
	remove_menu_page('seopress-option');
	//Hide "SEO → Dashboard".
	remove_submenu_page('seopress-option', 'seopress-option');
	//Hide "SEO → Titles & Metas".
	remove_submenu_page('seopress-option', 'seopress-titles');
	//Hide "SEO → XML - HTML Sitemap".
	remove_submenu_page('seopress-option', 'seopress-xml-sitemap');
	//Hide "SEO → Social Networks".
	remove_submenu_page('seopress-option', 'seopress-social');
	//Hide "SEO → Analytics".
	remove_submenu_page('seopress-option', 'seopress-google-analytics');
	//Hide "SEO → Instant Indexing".
	remove_submenu_page('seopress-option', 'seopress-instant-indexing');
	//Hide "SEO → Advanced".
	remove_submenu_page('seopress-option', 'seopress-advanced');
	//Hide "SEO → Tools".
	remove_submenu_page('seopress-option', 'seopress-import-export');
}

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

Where do I put this code?

How to Hide SEOPress Meta Boxes

function plt_hide_wp_seopress_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "SEO" meta box.
	remove_meta_box('seopress_cpt', $screen->id, 'normal');
	//Hide the "Content analysis" meta box.
	remove_meta_box('seopress_content_analysis', $screen->id, 'normal');
}

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