Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [meta-tags]

The tags placed in the <head> element to provide meta information about the document are called meta-tags.

18
votes
3answers
18k views

How to remove certain meta tags?

How can I remove these tags from my pages in Drupal 7? <link rel="shortlink" href=" .... " /> <meta name="Generator" content="Drupal 7 (http://drupal.org)" /> <link rel="canonical" ...
15
votes
2answers
19k views

How do I add a meta tag in <head>…</head> section?

How can I add the following meta tag inside the <head>...</head> section in Drupal 8? <meta http-equiv="X-UA-Compatible" content="IE=edge" />
9
votes
4answers
13k views

How to define Meta tags on Views? [closed]

Is there any module or some configuration that I can define the meta tags for the views page display in drupal 7 using Views 3.0?
9
votes
4answers
2k views

How to force the canonical URL to use http?

On our page we use the Metatag module to show a canonical meta tag. In the configuration we use the [current-page:url:absolute] token. This works fine, but the problem is, that whether the page gets ...
9
votes
1answer
6k views

Trying to add an html head tag in Drupal 8, beta 2

With Drupal 8.0 beta2, drupal_add_html_head() has been deprecated in favor of #attached. So the old way was: function MYTHEME_page_build(&$page) { $viewport = array( '#type' => '...
8
votes
1answer
3k views

Remove “Generator” meta tag?

What is the easiest way to remove the "Generator" meta tag in Drupal 8? <meta name="Generator" content="Drupal 8 (https://www.drupal.org)" /> Can this just be done in a few lines of code?
7
votes
5answers
6k views

How do I add custom meta tags to a view page?

There doesn't seem to be an answer for Drupal 8 yet. I have the metatag module installed, it's a great module, but doesn't seem to address views at all. This post for Drupal 7 says that it comes with ...
7
votes
3answers
1k views

How to reorder meta tags in Drupal 7

According to my clients requirement I need to change the order of meta tags, against the default display on page source. And he also wants to hide some of the meta tags which he thinks are not of use....
7
votes
5answers
4k views

How do I add description and keyword to the front page?

I would like to know how to set description and meta keywords for the front page. I use the Meta tags module for articles, but it is not working for the front page. I use Panel as my front page. My ...
6
votes
1answer
3k views

Unable to generate og:image

I have installed the Metatag module, along with ImageCache Token, but it just does not work. I have tried many of the different available tokens in the Open Graph image field for my node, and none ...
6
votes
1answer
1k views

How to adjust the length of [node:summary] for metatags?

How can I tweak the amount of characters for [node:summary], so that the description metatag never shows more than 150 characters? On admin/config/search/metatags/config/node I can only see for ...
5
votes
2answers
2k views

How do I add a specific meta-tag to all the pages of a site?

I want to prevent Google from indexing my website. I know I need this meta tag added to the header. <meta name="robots" content="noindex" /> How can I add this meta-tag to all the pages of a ...
5
votes
2answers
2k views

Drupal 8 Metatag and Media Entity modules to set meta image tags

On a Drupal 8 content type, I have a field with an entity reference field to a Media Entity field. I would like to use the Metatag module to set the image that is on this Media entity in the og:image ...
5
votes
1answer
3k views

Set title bar programmatically

I have to set, programmatically, the title value of pages, only for browser title bar (this value is stored in a metatags_quick field) If I use "drupal_set_title" I change also the title displayed in ...
5
votes
1answer
2k views

Programmatically add custom meta description via metatag module

I'm trying to add a custom meta tag description for a custom module using the metatag module. I tried this without success: function mycustommodule_metatag_metatags_view_alter(&$output, $...
4
votes
6answers
30k views

How to add custom metatags in drupal 7?

I need to add a custom metatag to D7 site, something like here: http://groups.drupal.org/node/83069. What are the possible options? I know there is a metatag module, but seems it doesn't support ...
4
votes
3answers
5k views

How do I overwrite meta tags?

In Drupal 7 I used this to unset unneeded elements and total overwrite meta tags: function MYTHEME_html_head_alter(&$head_elements) { // Unset all. $remove_array = array( '...
4
votes
3answers
2k views

Meta tag module not visible under individual node

I have installed Drupal 8 on my local machine with Metatags module for SEO. The global settings are available to edit under Configurations → Search and Metadata → Metatag but the Metatag tab is not ...
4
votes
1answer
3k views

I can't translate description of front page in my multilingual site

I have a multilingual drupal 7 site. I want to translate my description metatag of my English frontpage version of my site. Any other page show ok in site Greek and English. The problem is it only ...
4
votes
1answer
1k views

Adding META tag to nodes with a specific topic

If a node has a term reference to a specific term (say termid 123) I want to add this META tag to prevent search engine spiders from indexing the page: <meta name="robots" content="noindex"> ...
4
votes
1answer
661 views

How do I configure meta tags for a panel page?

How do I configure meta tags for a panel page? I want to change title, keywords and description. Ideally I want to use Yoast.
4
votes
1answer
811 views

How to noindex on paginated pages in Drupal 7?

This question is almost a copy of: How to noindex comment/reply in Drupal 7 However in this case i would like to know how to add noindex,follow on paginated pages. For example I want to add noindex,...
3
votes
4answers
8k views

Meta tags, title and description not showing up on home page

I have a regular page set as the home page on my site. The Meta Tags, Title and Description are all set on the node, but do not show up on the home page. Any ideas why?
3
votes
1answer
1k views

Simplest way to get a full set of favicons and touch icons

So you've generated a big batch of favicons, touch icons, tiles and whatever to cover the full range of files a broswer might look for, and the generator you used has helpfully given you a whole lot ...
3
votes
1answer
961 views

How to add a META tag in head conditionally to entity content

I need to put a meta NOINDEX tag in head conditionally to a CCK field value ("visibility=private") in one specific content type ("projects"). I read about drupal_add_html_head($data = NULL, $key = ...
3
votes
2answers
2k views

Metatags trimmed body in description/summary

I am using the Metatag Module. Everything works as expected, till I checked the description for each node and saw that it is empty. Since there is no output with [node:summary] I changed it to [node:...
3
votes
4answers
4k views

Twitter Card Preview is failing with twitter:image

I'm trying to add Twitter Cards to my site so that tweets referencing my blog posts will be expandable and show extra info. I've installed the metatag module, enabled the Metatag: Twitter Cards sub-...
3
votes
2answers
854 views

How can to make required the fields keywords and description of the metatags module?

I have a content type and I am interested in make required the field keyword and field description of the metatags module? anyone knows how can I do it? The field title is not required. The field ...
3
votes
1answer
2k views

Addind a meta noindex tag within template.php

I would like to add a meta tag noindex from within the template.php file of my theme. The purpose is to remove two nodes 404 error page from google's index, I would like to do it like so : // in ...
3
votes
1answer
275 views

How to use default field_image if value is not provided?

We are using Schema.org Metatag module to display meta tag attributes to the Article content type. We have a field that we using as an ImageObject using the field_image field. The field_image is setup ...
3
votes
1answer
2k views

How can I add meta tags for pages created with views in Drupal 8? [closed]

I need to add meta tags for pages created using views in Drupal 8, I tried to use Metatag module. but it seems like there is no views integration on D8 version of this module. I also tried to install ...
3
votes
1answer
108 views

Translation table: How do I restore a deleted metatag string?

At the Translation table module (admin/config/regional/translate/translate), I was translating metatags. By accident I deleted one (metatag:global:og:street-address). I thought I just delete all the ...
3
votes
1answer
357 views

How to pull pictures and summary information from external web pages when posting links?

When posting a link (external web page) to my Drupal blog, is there a way to have Drupal automatically pull the picture and summary information from that link and include it in the post on my Drupal ...
2
votes
1answer
5k views

adding open graph metatags to head

Doe's anybody know how to add metatags such as fb:admins or fb:app_id into drupal 7 ? I use meta tags module for D7 but for some reason theese tags are not included. Thank you for answers.
2
votes
4answers
8k views

Meta Tags on Frontpage

It doesn't seem I can get my meta tags to appear on the page--front.tpl.php on a Drupal 7 site. I feel like I have all the correct settings in the Meta tags module configuration, and I have cleared ...
2
votes
1answer
2k views

How to use drupal_add_html_head() to add the same metatag multiple times?

I have a node which has multiple images attached to it. And each image should also be printed in a <meta property="og:image" content="image_url" /> metatag. I have tried to use ...
2
votes
1answer
1k views

Where is the the full tokens list for a site?

In the Metatag module UI it uses tokens but only shows a small list of tokens that are relative to the site information rather than the full content tokens which it can use, in D7 there was an admin ...
2
votes
1answer
2k views

Add a meta content=“noindex,nofollow” tag on a node created programmatically

Is it possible to add a meta content="noindex,nofollow" tag to the head on the page of a node created programmatically (and onl this node)? I have created the node like this: function ...
2
votes
3answers
4k views

How to add metatags to a view?

I need to add rel=canonical meta tags to some views. There are a couple of sandbox modules for the metatag module but I'm looking for a more simple solution. Couldn't I just use views_php and ...
2
votes
2answers
3k views

Set Image Custom Field as Open Graph Image in Metatags

I have installed the Metatags module along with the Open Graph and Twitter Card extension modules. In my default content type, I have added an Image field that allows an image to be uploaded for use ...
2
votes
1answer
1k views

How to add content-language

How can i add this meta tag in my website : <meta http-equiv=“content-language” content=“en-us”> ? I am using metatags module but i dont see any option about this. Is there any other way ...
2
votes
3answers
659 views

Omega theme meta tag problem on Google

I'm using Omega theme. But when search my site on Google, description is site menu items. I want change this area via spesific word. So, open my template.php file and add this codes: function ...
2
votes
1answer
4k views

Clean and easy way to add meta tags to my D7 website

I'm looking for a easy way to add meta tags to my D7 website. Not that I'm afraid of code or anything like it, but the content managers (Marketing => biggest IT noobs you've ever seen) want to add ...
2
votes
1answer
2k views

Canonical URL Meta Tag for a View Page

I'm using the Meta Tags Module and it has been a solid way to add meta tags throughout the site - especially the increasingly important Canonical URL meta tag. I'm having trouble adding the same tag ...
2
votes
1answer
4k views

How to use metatags_quick to add no-cache meta tags in D7?

I'd like to add the following to the meta tags for a single page on my D7 site: <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> <meta http-equiv="Pragma" ...
2
votes
2answers
839 views

Title tag not overriding after using meta tag module

I have created a content type for uploading user details. I have changed the title as UPLOAD PAGE using drupal_set_title. I have installed Meta Tag module, now page title remains same but title tag i....
2
votes
1answer
652 views

Add Meta tags and Title on hook_menu “page callback” [closed]

How to add Meta and Title tags to the document head on hook_menu "page callback"? Drupal 7 Thanks!
2
votes
1answer
241 views

Why the meta-tag module add “|” after the site name?

I am building a Drupal 7 site using the Metatag module. I know that on the settings of the module there are many tokens, and that's great. For example, the title under 'Global -> page title' is: "[...
2
votes
1answer
3k views

How to add noindex / nofollow robot metatags to Views subpages

I have a big view with lots of filters, and Google and friends are killing one of my sites after a cache clear. How could I add noindex and nofollow metatags in this views' subpages header? I would ...
2
votes
4answers
1k views

How can I change tag separator from “,” to “+”?

I want to change tag separator in a Term reference field of my content type (using Autocomplete term widget (tagging)) from "," to "+" or maybe something else (in Drupal 7) because this field needs to ...