Jump to content

[SOLVED] How to define META Description with Smarty ?


Recommended Posts

Hello

I have a little problem in my tag pages search engine optimization in my last shop (a full personal template => Master Materiel, always in development). The problem is that tag pages aren't optimized for SEO (no meta fields filled, lack of text in the page...) and that's why I wanted to fill all META fields as Title, Description and Keywords.

The Meta Title field works fine with this code :

$smarty->assign('meta_title', $mytitle);



For the Meta description, I tried this code but it doesn't works :

$smarty->assign('meta_description', $mydescription);



(this code is in header.php, in the root of the shop ; you can detect the tag pages by $_GET['tag'] value...)


The interest of Description Meta field is to give to Google (and other search engines) the text for the snippet, below the title (which is usually the Meta Title !) ; there isn't any interest for positioning the page in the search engine result page. But it gives a better ClickThrough Rate on the result page !

So that's my question : how to assign the meta_description value ?

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 1 year later...

Bonsoir

Sauf erreur, on peut définir cela en modifiant un fichier, mais je ne sais plus lequel :( (bah oui ça date un peu lol)

Ceci étant dit, comme j'utilise essentiellement des modifs "en dur" dans le header.php pour le SEO (prochainement une série d'articles très complets à ce sujet sur mon site/blog, qui va se transformer pour l'occasion !) cela me pose très peu de soucis...

Link to comment
Share on other sites

×
×
  • Create New...