I'm using Drupal 7 and want to add meta tags in my theme. How can i do it without any module?
closed as too broad by Triskelion, monymirza, AjitS, Free Radical, Chapabu Jul 24 '13 at 13:24
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Using a module is the preferred way, as in that way you don't need to edit a theme, or create a sub-theme to set meta tags.
The alternative would be changing the html.tpl.php template used from the theme, and add a call to a function present in its template.php file that returns the meta tags to add to the page.
There is one case where editing the theme being used, or sub-theming it, to add the meta tags would make sense: when the meta tags are very specific for the theme being used that they should not added to every theme used from the site.
I would also prefer using a module as I would not need to worry about updating the module for a new Drupal version, or writing the update functions.
If, viceversa, I need to be 100% sure there will be a module version for the next Drupal, I would write my own custom module, knowing that it's just me that can fix any security issues I would introduce in the code (which also mean I am left alone with finding any security issue).