Jump to content

Removing the news section


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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