Tips on Customizing WordLift – AI powered SEO – Schema

How to Hide WordLift Admin Menus

function plt_hide_wordlift_menus() {
	//Hide "Dashboard →".
	remove_submenu_page('index.php', 'wl-setup');
	//Hide "Tools → Scheduled Actions".
	remove_submenu_page('tools.php', 'action-scheduler');

	//Hide "Vocabulary".
	remove_menu_page('edit.php?post_type=entity');
	//Hide "Vocabulary → All Entities".
	remove_submenu_page('edit.php?post_type=entity', 'edit.php?post_type=entity');
	//Hide "Vocabulary → Add New Entity".
	remove_submenu_page('edit.php?post_type=entity', 'post-new.php?post_type=entity');
	//Hide "Vocabulary → Categories".
	remove_submenu_page('edit.php?post_type=entity', 'edit-tags.php?taxonomy=category&post_type=entity');
	//Hide "Vocabulary → Entity Types".
	remove_submenu_page('edit.php?post_type=entity', 'edit-tags.php?taxonomy=wl_entity_type&post_type=entity');

	//Hide "WordLift".
	remove_menu_page('wl_admin_menu');
	//Hide "WordLift → WordLift".
	remove_submenu_page('wl_admin_menu', 'wl_admin_menu');
	//Hide "WordLift → Settings".
	remove_submenu_page('wl_admin_menu', 'wl_configuration_admin_menu');
	//Hide "WordLift → Download Your Data".
	remove_submenu_page('wl_admin_menu', 'wl_download_your_data');
}

add_action('admin_menu', 'plt_hide_wordlift_menus', 101);

Where do I put this code?

How to Hide WordLift Meta Boxes

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

	//Hide the "Entity Types" meta box.
	remove_meta_box('wl_entity_typediv', $screen->id, 'side');
	//Hide the "WordLift" meta box.
	remove_meta_box('wl-metabox-6619ccde16c58', $screen->id, 'normal');
	//Hide the "WordLift" meta box.
	remove_meta_box('wl-metabox-6619cce2e5b71', $screen->id, 'normal');
}

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

How to Hide WordLift Dashboard Widgets

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

	//Remove the "Latest WordLift News" widget.
	remove_meta_box('wordlift-dashboard-latest-news-widget', 'dashboard', 'normal');
	//Remove the "WordLift Dashboard" widget.
	remove_meta_box('wl-dashboard-v2', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_wordlift_dashboard_widgets', 20);