Jump to content

Hook to hide the ClientAreaPrimaryNavbar


Davor

Recommended Posts

Hello,

I can find how to hide Child Items from ClientAreaPrimaryNavbar

something like:

use WHMCS\View\Menu\Item as MenuItem;
add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
    if (!is_null($primaryNavbar->getChild('Network Status'))) {
        $primaryNavbar->removeChild('Network Status');
    }
});

 

Does anyone know how to remove (hide) the whole ClientAreaPrimaryNavbar?

Thanks,

Davor

Link to comment
Share on other sites

Found it,

maybe it is not the perfect solution but it works.

Here is what I have added to my custom hook file:

 

#hide the primary menu
#works, but each WHMCS  System Theme is having different class for the Menu
#   WHMCS System Theme Six is .navbar-main
#   WHMCS System Theme Twenty-One is header.header .main-navbar-wrapper
add_hook('ClientAreaHeadOutput', 1, function($vars)
{
	return '<style>header.header .main-navbar-wrapper { display: none; } .navbar-main { display: none; }</style>';
});

 

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.

×
×
  • 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