wordpress plugin hide from admin panel

I am new to wordpress,i am willing to only hide some wordpress installed plugin from admin panel or called or work through from my theme-function.php,is possible?

Related posts

Leave a Reply

3 comments

  1. If you like to hide all plugins then try this code in functions.php file

    add_filter('all_plugins', '__return_empty_array');
    

    If you like to hide specific plugin then try this code in functions.php file

    add_filter('all_plugins', 'hide_plugins');
    
    function hide_plugins($plugins) {
        unset($plugins['pods/init.php']); 
        //unset($plugins['plugin-folder-name/plugin-file.php']);
        return $plugins;
    }
    

    If you like to hide multiple plugins then try this code in functions.php file

    add_filter('all_plugins', 'hide_plugins');
    
    function hide_plugins($plugins) {
        unset($plugins['pods/init.php']);
        unset($plugins['akismet/akismet.php']); 
        //unset($plugins['plugin-folder-name/plugin-file.php']);
        return $plugins;
    }
    
  2. Add bellow code in your function.php file

    <?php
    add_filter('all_plugins', 'hide_plugins');
    
    function hide_plugins($plugins) {
        unset($plugins['akismet/akismet.php']);
        //unset($plugins['plugin-dir-name/plugin-file.php']);
        return $plugins;
    }
    ?>