By soezkan on
Hi all,
I developed a custom module for drupal 7.
In order to show the snippet description in google search results, I want to optimize this site description.
Where do I add that in my.module-file?
Many thanks for help.
Bests
Soezkan
Comments
check this - https://api
check this - https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_...
Use template.php from you theme
You can add it directly form the theme or you can put it in the html.tpl.php but this is not Drupal way.
If you want that you tag to be added on all pages you ca usehook_preprocess_html(&$variables) and put inside:
The hook should be in template.php from you theme . You ca used in your module to.
Or you ca use https://www.drupal.org/project/metatag for SEO
Thanks for your replies!
Thanks for your replies!
Now I installed the metatags module.
If I write a description for a particular node, how do I get the content of the meta-tag-description
into here:
Thanks for more help!
Bests
Soezkan
If you use metatags you do
If you use metatags you do not need to do anything.
The module will add it automatically