-
Home
-
PDF for WPForms + Drag and Drop Template Builder
- Tips
How to Hide PDF for WPForms + Drag and Drop Template Builder Admin Menus
function plt_hide_pdf_for_wpforms_menus() {
//Hide "PDF Templates".
remove_menu_page('edit.php?post_type=yeepdf');
//Hide "PDF Templates → PDF Templates".
remove_submenu_page('edit.php?post_type=yeepdf', 'edit.php?post_type=yeepdf');
//Hide "PDF Templates → Add New Post".
remove_submenu_page('edit.php?post_type=yeepdf', 'post-new.php?post_type=yeepdf');
//Hide "PDF Templates → Settings".
remove_submenu_page('edit.php?post_type=yeepdf', 'yeepdf-settings');
}
add_action('admin_menu', 'plt_hide_pdf_for_wpforms_menus', 10000);
Where do I put this code?
How to Hide the "Builder PDF" Meta Box
function plt_hide_pdf_for_wpforms_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Builder PDF" meta box.
remove_meta_box('email-builder-main', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_pdf_for_wpforms_metaboxes', 20);