Closed (fixed)
Project:
BlueMasters
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
13 Apr 2011 at 22:40 UTC
Updated:
27 Aug 2015 at 16:40 UTC
Jump to comment: Most recent
Hi,
I'd like to know how to add the meta tags description and keywords to the frontpage. Only meta tags content type and generator appear on my site.
and also how to modify those meta tags
Thank you for your help
Comments
Comment #1
gtsopour commentedComment #2
gtsopour commentedHello abonados
You can use drupal_add_html_head() for adding meta description and meta keywords in header. In Bluemasters theme template.php file, you can call hook_page_alter() for embeding meta. If you want to add meta description and meta keywords in your site then go to your template.php file and paste the code (display below):
Finally change 'content' with your content.
Thanks
George
Comment #4
ressaThanks @gtsopour, I tried to get your example to work with the Bartik theme, to only show the description on the front page, but couldn't make it work. It works if I use hook_preprocess_html in stead though:
You can insert the site slogan like this (in stead of 'some description here'):
'content' => check_plain(variable_get('site_slogan', ''))Comment #5
vlad074 commentedConcerning to the first answer:
'some description here' - it is a static parameter,
how can i input a variable from "Metatag" module, non-static?
Or from something else module