Remove admin sub menu from child theme

Question

I’ve created a child theme of TwentyTwenty One and in the child’s function file I am trying to remove admin menu option “widgets”. I’ve tried a few things but had no luck, any suggestions?

   add_action( "admin_menu", "ls_remove_menu_items", 999 );
  function ls_remove_menu_items() {
     remove_submenu_page( "themes.php", "widgets.php" ); 
  }

0
Shezza 9 months 2021-12-03T18:40:01-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse