0

I have a dislike of plugins that don't tidy themselves away. Smush is a case in point. Ok, it puts itself at the bottom but really, I'd like to have it as a submenu of Media (or perhaps Tools).

`add_action('admin_menu', 'move_smush_menu_page');

function move_smush_menu_page()
{
  add_submenu_page('upload.php', 'Smush', 'Smush', 'manage_options', 'smush');
}`

Does the trick, makes Smush a submenu but it's still in the parent menu. How do I remove it from there?

0

Turns out was easy;

add_action('admin_menu', 'move_smush_menu_page');

function move_smush_menu_page()
{
  add_submenu_page('upload.php', 'Smush', 'Smush', 'manage_options', 'smush');
  remove_menu_page( 'smush' );
}`
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.