cumputerman Posted March 27, 2018 Share Posted March 27, 2018 How can i add panel only to main homepage of my site https://www.seimaxim.com Panel should be visible under domain search and above twitter feeds so visitors can see products I am offering on homepage. I have below hook but it is shown only after logging into client area. It does not show only on homepage as I want to do so. <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { $thankYouMessage = <<<EOT <p>Thanks for beta testing our latest offerings! To show our appreciation we'd like to provide next month of service <strong>on the house</strong>.</p> EOT; // Add a homepage panel with a link to a free month promo and mode it to the // front of the panel list. $homePagePanels->addChild('thanks', array( 'label' => 'Thanks for the help!', 'icon' => 'fa-thumbs-up', 'order' => 20, 'extras' => array( 'color' => 'gold', 'btn-link' => 'https://example.org/free-month-promo', 'btn-text' => 'Redeem Your Free Month', 'btn-icon' => 'fa-arrow-right', ), 'bodyHtml' => $thankYouMessage, 'footerHtml' => 'Act fast! This offer expires soon!', )); }); Link to comment Share on other sites More sharing options...
brian! Posted March 28, 2018 Share Posted March 28, 2018 11 hours ago, cumputerman said: How can i add panel only to main homepage of my site https://www.seimaxim.com Panel should be visible under domain search and above twitter feeds so visitors can see products I am offering on homepage. I have below hook but it is shown only after logging into client area. It does not show only on homepage as I want to do so. a homepagepanel hook wouldn't work because, as you have found, it's only shown on the client's homepage when they're logged in... not the generic homepage. when you say panel, what exactly do you mean? the simplest solution might just be to edit homepage.tpl - that's the page that shows the tweets, so you could put your 'panel' above that code (html or whatever, won't necessarily be a hook) and it will be shown where you want. if you want to add something between the domain search and the 'how can we help you today?' buttons, then that's within header.tpl Link to comment Share on other sites More sharing options...
Recommended Posts