Dominika Posted July 18, 2020 Share Posted July 18, 2020 Hello, I purchased WHMCS 2 days ago and Im having a really hard time customising it as most of the hooks used in the past don't work anymore so most of the previous posts on forums etc are a bit useless. I want to remove "Categories" from secondary sidebar, I found this but it doesnt work.... I appreciate your help in advance! I added this to includes/hooks/chsidebar.php http://creativeherhosting.com/hosting/cart.php?a=confproduct&i=1 <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $SecondarySidebar) { if(!is_null($SecondarySidebar->getChild('Categories'))){ $SecondarySidebar->removeChild('Categories'); } }); ?> 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 21, 2020 Share Posted July 21, 2020 On 18/07/2020 at 13:11, Dominika said: I want to remove "Categories" from secondary sidebar, I found this but it doesnt work.... your code works for me... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $SecondarySidebar) { if (!is_null($SecondarySidebar->getChild('Categories'))){ $SecondarySidebar->removeChild('Categories'); } }); 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Lawrence Posted July 22, 2020 WHMCS Technical Analyst II Share Posted July 22, 2020 I can verify that the provided code works on my test installs as well. If it does not work on yours, despite putting it in a PHP file in the /includes/hooks folder as described, please ensure that your website isn't behind a caching service that is unexpected caching the HTML output of PHP pages and may be causing this as a result. If that doesn't help or apply, please feel free to reach out to our support team via https://www.whmcs.com/submit-a-ticket/ and we can investigate this further. 0 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.