-
Home
-
Limit Comments and Word Count
- Tips
How to Hide the "Comment-Word Limit" Admin Menu
function plt_hide_limit_comments_and_word_count_menus() {
//Hide the "Settings → Comment-Word Limit" menu.
remove_submenu_page('options-general.php', 'lpwc_settings_page');
}
add_action('admin_menu', 'plt_hide_limit_comments_and_word_count_menus', 11);
Where do I put this code?
How to Hide the "Limit Comments and Word Count Settings" Meta Box
function plt_hide_limit_comments_and_word_count_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Limit Comments and Word Count Settings" meta box.
remove_meta_box('limit-comments-and-word-count-settings', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_limit_comments_and_word_count_metaboxes', 20);