Thijs Moerman Posted March 31, 2019 Share Posted March 31, 2019 Hello world! I would like to remove the "news" section from my homepage, as it's completely blank now. I tried using the following hook, but that seems to be outdated on the newest php version: <?php # Remove Announcements and/or Tweets from Homepage # Written by brian! function remove_announcements_from_homepage_hook($vars) { return array("announcements" => "", "twitterusername" => ""); } add_hook("ClientAreaPageHome", 1, "remove_announcements_from_homepage_hook"); ?> Are there any others ways to remove it? As it's bothering me. Thanks in advance! Greets, Thijs 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 1, 2019 Share Posted April 1, 2019 Hi Thijs, On 31/03/2019 at 11:59, Thijs Moerman said: I tried using the following hook, but that seems to be outdated on the newest php version: I don't see why - you've messed up the formatting, but the hook should still work on any version. On 31/03/2019 at 11:59, Thijs Moerman said: I would like to remove the "news" section from my homepage, as it's completely blank now. the homepage.tpl template is designed to either show a Twitter feed (if you've added a Twitter username to your settings), or your 3 latest announcements... if you use the above hook, it will null both those variables and the bottom half of the homepage will effectively be empty (at least when using Six)... if that's what you're seeing (and you have announcements and/or Twitter added to your WHMCS), then I suspect the hook is working fine. what do you want to show on the homepage ? if you want to show something other than announcements or twitter, then your best bet is to edit the homepage.tpl template. 0 Quote Link to comment Share on other sites More sharing options...
Thijs Moerman Posted April 2, 2019 Author Share Posted April 2, 2019 On 4/1/2019 at 1:30 PM, brian! said: Hi Thijs, I don't see why - you've messed up the formatting, but the hook should still work on any version. the homepage.tpl template is designed to either show a Twitter feed (if you've added a Twitter username to your settings), or your 3 latest announcements... if you use the above hook, it will null both those variables and the bottom half of the homepage will effectively be empty (at least when using Six)... if that's what you're seeing (and you have announcements and/or Twitter added to your WHMCS), then I suspect the hook is working fine. what do you want to show on the homepage ? if you want to show something other than announcements or twitter, then your best bet is to edit the homepage.tpl template. Hello Brian, I fixed it, it had something to do with the primarySidebar. Thank you for your time. Greets, Thijs 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.