ChrisTERiS Posted May 1, 2017 Share Posted May 1, 2017 Hello, I want to add the code below to header.tpl <meta property="fb:app_id" content="{$CFG.fb_app_id}"> <meta property="og:url" content="{$thread.fb_url}" /> <meta property="og:title" content="{$thread.fb_title}" /> <meta property="og:description" content="{$thread.fb_description}" /> <meta property="og:video" content="https://www.youtube.com/v/{$thread.video}" /> <meta property="og:image" content="{$CFG.siteurl}/photos/{$thread.photo}" /> <meta property="og:image" content="{$CFG.siteurl}/images/{$CFG.fb_image}" /> <meta property="og:image:width" content="1200" /> <meta property="og:image:height" content="630" /> Is there any way to do it using hooks? I seen in the template a variable $headoutput. Is this something that I can modify eg $headoutput .= '....................'; Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 1, 2017 Share Posted May 1, 2017 <?php function client_custom_headoutput_hook($vars) { $head_return = ''; $head_return = '<meta property="fb:app_id" content="{$CFG.fb_app_id}"> <meta property="og:url" content="{$thread.fb_url}" /> <meta property="og:title" content="{$thread.fb_title}" /> <meta property="og:description" content="{$thread.fb_description}" /> <meta property="og:video" content="https://www.youtube.com/v/{$thread.video}" /> <meta property="og:image" content="{$CFG.siteurl}/photos/{$thread.photo}" /> <meta property="og:image" content="{$CFG.siteurl}/images/{$CFG.fb_image}" /> <meta property="og:image:width" content="1200" /> <meta property="og:image:height" content="630" />'; return $head_return; } add_hook("ClientAreaHeadOutput",1,"client_custom_headoutput_hook"); 1 Quote Link to comment Share on other sites More sharing options...
ChrisTERiS Posted May 1, 2017 Author Share Posted May 1, 2017 @brian! Really appreciated. Thank you ! 0 Quote Link to comment Share on other sites More sharing options...
wulfric Posted May 3, 2017 Share Posted May 3, 2017 You also might wanna check out this addon - it's great http://www.hardsoftcode.com/product/24/whmcs-seo-manager/documentation 0 Quote Link to comment Share on other sites More sharing options...
ChrisTERiS Posted May 3, 2017 Author Share Posted May 3, 2017 You also might wanna check out this addon - it's great http://www.hardsoftcode.com/product/24/whmcs-seo-manager/documentation Sorry but can you tell me how that addon will helps me to modify the header.tpl? The link is a short documentation on how to install a specific mod. Nothing in common with my question. 1 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.