arsalahmed786 Posted April 13, 2019 Share Posted April 13, 2019 How to permanently knowledgebase tab ? Yeah i saw old thread but i think these are too old @Brian says: remove the following commend but where is it? on which file? <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Knowledgebase'))) { $primaryNavbar->removeChild('Knowledgebase'); } if (!is_null($primaryNavbar->getChild('Support'))) { $primaryNavbar->getChild('Support') ->removeChild('Knowledgebase'); } }); Please tell me where i can find above script so i can remove it. 0 Quote Link to comment Share on other sites More sharing options...
arsalahmed786 Posted April 13, 2019 Author Share Posted April 13, 2019 Nevermind i found how to use hook method. but i want to remove Network status and knowledgebase both i can't remove 2 menu. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 13, 2019 Share Posted April 13, 2019 1 hour ago, arsalahmed786 said: Please tell me where i can find above script so i can remove it. you don't REMOVE it, you ADD it... so create a new .php file in /includes.hooks, give it a filename (e.g kbremove.php) and paste the above code into it - and that should remove the two knowledgebase links. the other way would be to add some css in a custom.css file... #Primary_Navbar-Knowledgebase, #Primary_Navbar-Support-Knowledgebase {display: none;} but you only need to choose one method - hook or css - there is no need to use both of them. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 13, 2019 Share Posted April 13, 2019 Just now, arsalahmed786 said: but i want to remove Network status and knowledgebase both i can't remove 2 menu. either method will work with other menu items - in the case of hooks, you just need to find it's "menuitemname" value... with regards to css, you just need it's ID value. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.