rottenteeth Posted February 9, 2021 Share Posted February 9, 2021 Hi, actually I made this hook, but the RSS Feed doesn't not dissapper. Could you give me some advice what I'm doing wrong? I don't know which hook is correct, but all of this do not remove View RSS Feed from Announcements. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Announcements'))) { $primaryNavbar->getChild('Announcements') ->removeChild('View RSS Feed'); } }); add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $secondarNavbar) { if (!is_null($secondarNavbar->getChild('Announcements'))) { $secondarNavbar->getChild('Announcements') ->removeChild('View RSS Feed'); } }); add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Announcements'))) { $primarySidebar->getChild('Announcements') ->removeChild('View RSS Feed'); } }); add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Announcements'))) { $secondarySidebar->getChild('Announcements') ->removeChild('View RSS Feed'); } }); 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted February 9, 2021 Author Share Posted February 9, 2021 I also try with, but this still not working. ->removeChild('RSS Feed'); 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 10, 2021 Share Posted February 10, 2021 21 hours ago, Damian Olko said: I don't know which hook is correct, but all of this do not remove View RSS Feed from Announcements. the third one is the closest - it's a primary sidebar, but it's called 'RSS Feed' rather than 'View RSS Feed'. another way, assuming that you're using Six or 21 (or a child of either) would be to use CSS in a custom.css file... #Primary_Sidebar-Announcements_Months-RSS_Feed {display: none !important;} 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted February 24, 2021 Author Share Posted February 24, 2021 (edited) So, this helped but still presented on the mobile width and the like when the dropdown menu is activated Edited February 24, 2021 by rottenteeth 0 Quote Link to comment Share on other sites More sharing options...
rottenteeth Posted February 24, 2021 Author Share Posted February 24, 2021 I do the same for this section where @media is declared in .css file, but not helped 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 24, 2021 Share Posted February 24, 2021 the CSS code below should hide it in both browser and mobile.... [menuitemname="RSS Feed"] {display: none !important;} 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.