spartanza Posted August 22, 2018 Share Posted August 22, 2018 (edited) admins please delete Edited August 22, 2018 by spartanza admins please delete 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 22, 2018 Share Posted August 22, 2018 13 minutes ago, spartanza said: I need to add one line of code within the body tags of the website - that is immediate. But ongoing, I would like to know how to do this easily and the best way with WHMCS so I can handle it myself in the future. to insert code between the <body> and </body> tags, you could use a ClientAreaHeaderOutput hook - so in the hook below, it's adding some CSS styling to the page, but you could use it to add js or any other code too... <?php function insert_body_code_hook($vars) { return <<<HTML <style>.view-cart-tabs {display: none;}</style> HTML; }; add_hook("ClientAreaHeaderOutput",1,"insert_body_code_hook"); the only line in the hook that you should need to change is what goes between the two HTML tags in it - that's the code that will be added to the template. I suppose in some circumstances you may need to edit the template (header.tpl) instead, but usually using a hook will be easier. 0 Quote Link to comment Share on other sites More sharing options...
spartanza Posted August 23, 2018 Author Share Posted August 23, 2018 Thank you 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted August 23, 2018 Share Posted August 23, 2018 On 22/08/2018 at 8:33 PM, spartanza said: admins please delete @spartanza can I please refer you to our WHMCS.Community Guidelines, specifically guideline 2.5 On 7/09/2016 at 8:55 PM, WHMCS ChrisD said: 2.5 Your posts assist other users, please do not delete content if you find an answer, please share this solution to help other users. 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.