CMSMS meta tags not retrieved

86 Views Asked by At

I built a site with CMSMS. I'm having trouble retrieving the meta tags. I assume this needs to be done in the header.inc.php file. As of now, meta-tag for content is empty.

<meta name="description" content="">

According to some documentations I found online I need to put

<meta name="description" content="{content}"> 

but that just outputs literally that in the markup. What is the right way?

<meta name="description" content="{$content}"> 
<meta name="description" content={content}> 
<meta name="description" content="<?php $content ?>"> 
<meta name="description" content="<?php echo $content ?>"> 

and what about {keywords}?

None of those work.

1

There are 1 best solutions below

0
KiwiChris On

You don't need to touch the header.inc.php, you are using CMS Made Simple, not CMS made difficult :).

Go to 'Site Admin > Settings - Global Settings > General Settings tab > Global Metadata', add all your tags in there and put the smarty tag {metadata} in a page template.

More details here: https://docs.cmsmadesimple.org/configuration/global-settings

Hope that helps. PS plenty of fast advise on the Slack channel also.