Tips on Customizing Themify Portfolio Post

How to Hide Themify Portfolio Post Admin Menus

function plt_hide_themify_portfolio_post_menus() {
	//Hide "Portfolios".
	remove_menu_page('edit.php?post_type=portfolio');
	//Hide "Portfolios → Portfolios".
	remove_submenu_page('edit.php?post_type=portfolio', 'edit.php?post_type=portfolio');
	//Hide "Portfolios → Add New".
	remove_submenu_page('edit.php?post_type=portfolio', 'post-new.php?post_type=portfolio');
	//Hide "Portfolios → Portfolio Categories".
	remove_submenu_page('edit.php?post_type=portfolio', 'edit-tags.php?taxonomy=portfolio-category&post_type=portfolio');
}

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

Where do I put this code?

How to Hide the "Themify Custom Panel" Meta Box

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

	//Hide the "Themify Custom Panel" meta box.
	remove_meta_box('themify-meta-boxes', $screen->id, 'normal');
}

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