ST4R Posted September 8, 2017 Share Posted September 8, 2017 Hi there. I want to remove 'Announcements Months' panel which is located on announcements page. I've tried the following hook but it's not working! <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { $primaryNavbar->removeChild('Announcements Months'); }); 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 8, 2017 Share Posted September 8, 2017 <?php /** * Remove Announcements Months Sidebar * @author brian! */ use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Announcements Months'))) { $primarySidebar->removeChild('Announcements Months'); } }); 0 Quote Link to comment Share on other sites More sharing options...
ST4R Posted September 8, 2017 Author Share Posted September 8, 2017 It worked perfectly. Thank you brian! - - - Updated - - - Can you please let me know how can I remove 'Client Contacts'? it is located on clientarea page 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 8, 2017 Share Posted September 8, 2017 just copy the above hook and change the two references of 'Announcements Months' to 'Client Contacts' 0 Quote Link to comment Share on other sites More sharing options...
ST4R Posted September 8, 2017 Author Share Posted September 8, 2017 I already tried it but it is not working. I want to remove 'Support' which is located on submitticket page (step two) as well. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 8, 2017 Share Posted September 8, 2017 then it's a secondary sidebar... <?php /** * Remove Client Contacts Sidebar * @author brian! */ use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Client Contacts'))) { $secondarySidebar->removeChild('Client Contacts'); } }); support will be a secondary sidebar too.. just change 'Client Contacts' to 'Support'. 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.