Tips on Customizing The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid

How to Hide The Post Grid Admin Menus

function plt_hide_the_post_grid_menus() {
	//Hide "The Post Grid".
	remove_menu_page('edit.php?post_type=rttpg');
	//Hide "The Post Grid → All Grids".
	remove_submenu_page('edit.php?post_type=rttpg', 'edit.php?post_type=rttpg');
	//Hide "The Post Grid → Add New Grid".
	remove_submenu_page('edit.php?post_type=rttpg', 'post-new.php?post_type=rttpg');
	//Hide "The Post Grid → Settings".
	remove_submenu_page('edit.php?post_type=rttpg', 'rttpg_settings');
	//Hide "The Post Grid → Get Help".
	remove_submenu_page('edit.php?post_type=rttpg', 'rttpg_get_help');
}

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

Where do I put this code?

How to Hide The Post Grid Meta Boxes

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

	//Hide the "Short Code Generator" meta box.
	remove_meta_box('rttpg_meta', $screen->id, 'normal');
	//Hide the "Layout Preview" meta box.
	remove_meta_box('rttpg_sc_preview_meta', $screen->id, 'normal');
	//Hide the "Documentation" meta box.
	remove_meta_box('rt_plugin_sc_pro_information', $screen->id, 'side');
	//Hide the "Post Attributes" meta box.
	remove_meta_box('pageparentdiv', $screen->id, 'side');
}

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