Jump to content

How to remove knowledgebase tab in WHMCS


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated