Questions tagged [meta-tags]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
565 views

Add metatags import to migration

I have made a migration module to import the full content from a legacy Drupal 6 site to my new Drupal 7 site, using the migrate d2d module. Everything works fine, but I have just discovered that ...
0 votes
4 answers
937 views

Translate homepage meta Title and description

I have a Multilingual Drupal 7 site using i18. But how do I get my homepage meta Title and description translated?
0 votes
1 answer
422 views

Install Meta Tags and Meta Tags Quick modules on the same site

Short: Are Meta Tag and Meta Tag Quick incompatible modules? I am configuring a site that has Meta Tag Quick module but it doesn't allow me to have a meta description tag. It creates an Open Graph ...
1 vote
1 answer
793 views

How do i add Meta Tags on panels page?

I want to generate meta tags on panels node pages. I am adding Meta tags using nodewords module, it works fine on other node pages except panels generated layout. Any workaround for this?
2 votes
1 answer
54 views

How do I translate the default meta tags?

I dont see any option to translate default meta tags. Any tips? Admin url is at admin/config/search/metatag/taxonomy_term I am using metatag version 2.x
30 votes
6 answers
43k views

How do I add a meta tag inside the <head> tag?

How can I add the following meta tag inside the <head> tag? <meta http-equiv="X-UA-Compatible" content="IE=edge" /> I am trying to add it to a Drupal 8 site.
0 votes
0 answers
28 views

Remove tag in header: alternate

is it possible to delete a tag from our head tag (see it below) <link rel="alternate" hreflang="da" href="http://mysite.local/page1" /> I looked in interface (...
3 votes
1 answer
382 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 ...
0 votes
1 answer
398 views

full html and ckeditor strip some meta tags

I have this code in the field_data_body table in Drupal 7 in the database: <div itemprop="image" itemscope itemtype="https://schema.org/ImageObject" class="ioc" style="width: 276px; margin-right: ...
0 votes
2 answers
2k views

MetaTag with JSON API won't serialize

I'm attempting to get MetaTag info for a decoupled site but the JSON API is not converting the object to JSON correctly. I'm seeing other fields show up fine - the issue is isolated to the MetaTags. ...
0 votes
1 answer
77 views

Set a dynamic meta title on Node with MetaTag module installed

I've got one specific node where I need to dynamically set the meta title. The logic to determine the correct title is too involved to express in tokens; I need to do it in code. It seems that I ...
0 votes
0 answers
35 views

How to disable metatags for custom entity types?

I created a custom entity type, Fruits. I have the Metatag module enabled. I did not configure any settings to put metatags on the Fruits entity type, and it does not have a Metatag field. However, ...
4 votes
3 answers
4k views

Add meta tags on a page generated by a custom module

I am trying to modify the meta tags of one of the pages of my web. For example, I want to change the title, the description and add the robots tag. I have tried using the token and metatag modules to ...
1 vote
2 answers
159 views

Add taxonomy term assignment to meta tag

Drupal core 9.3.19, Metatag module 1.21.0 We have a taxonomy term named 'KamTags' which contains 'name' field only. The customer wants to define a bunch of KamTags taxonomy terms and have content team ...
0 votes
0 answers
116 views

how to update metatags using metatag_manager?

I have drupal 10 installation, I am trying to update robots metatag for old articles/pages, I am writing an update_hook . I found this really clean way to get the metatags parameters : $...
-2 votes
1 answer
64 views

Set the canonical link rel via theme's template.php for a specific views page (not a node)

I do not want to use the D7 Metatag or the MetaTag Quick modules. How can I specify a single canonical link rel for a single URL which is not a node (a view page) via the theme's template.php? I've ...
2 votes
1 answer
1k views

How to get the description text from metatag field

A content type in my Drupal 9 instance uses the Metatag module. I want to extract the 'description' metatag value and include it in a twig template (for the node). But when I look at the variables ...
-1 votes
3 answers
897 views

How to add metatags in hook_preproccess_node()?

How to add variable meta tags depending on the node that is loaded? The node has a picture and custom title field and the need to be variable. What is the best practice to change them in: ...
0 votes
0 answers
193 views

Update viewport value

maybe it's a stupid question but I couldn't find any appropriate answer to this question. I have a website with Drupal 9.4.8 I need to change the default viewport meta, but I couldn't find a way to do ...
2 votes
1 answer
934 views

Token does not return full dynamic path to Media Image URL

I'm having trouble configuring Metatag for Open Graph and Twitter Card images. I'm using Drupal 8.9 core Media Image reference field as the source. [node:field_hero_image] (Entity reference field) ...
0 votes
1 answer
119 views

Can't add Google Webmaster metatag because "Site Verification" category is missing

I'm using Drupal 7 (I can't update) and I'm trying to add Google Webmaster verification meta tag using the following instruction: https://www.drupal.org/docs/7/modules/metatag/howto-verify-a-site-on-...
2 votes
2 answers
924 views

How can I set "advanced" metatags programmatically?

The Metatag documentation gives an example of setting meta tags like this: $node->set('field_meta_tags', serialize([ 'title' => 'Some title', 'description' => 'Some description.', '...
0 votes
1 answer
124 views

There is a new meta tag setting to trim content from a token. How do I use it?

This and this site says there is a new Meta tag trim feature, but I have looked everywhere where I can think of and can't see an example of how to use it. Does anyone know how to use that?
0 votes
1 answer
51 views

Canonical link on node's print version

I'm using Metatag and Printer, email and PDF versions modules, and I want to have the canonical link on the print version of the nodes too, but for some reason they're only showing on the regular ...
0 votes
0 answers
87 views

Metatag cached, cannot change it

I'm running a D7 with the Metatag module 7.x-1.28, no other Metatag modules are enabled. On my front page node I: a) changed the metatag description from the old text to a new description text. b) in ...
0 votes
1 answer
124 views

Linkit Module - Pointing the link's title attribute to a custom field. Hook available? [closed]

Currently the Linkit module delivers the link's title attribute by pulling the related node's title field. We would like it to point to another field in the node. How can we achieve this? I looked ...
0 votes
1 answer
24 views

Frontpage title outputs a node's title and ADDS quotation marks

If a given node (page, article, etc) is visited, their site title (generated by {{ head_title|safe_join(' | ') }} is displayed correctly: My Page Title | Sample Website If the same node is then ...
0 votes
1 answer
262 views

Display metatag description of nodes in taxonomy term views

In Taxonomy term views, where are displayed shorten nodes I want to display node's metatag description instead body summary, but it doesn't work. I'm using Metatag module with it's submodule Metatag: ...
2 votes
2 answers
4k 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 ...
0 votes
1 answer
73 views

Meta Tags Module: Set of available meta tags is different for certain node types

I have a behaviour, which I don't understand: using Meta Tags and a couple of sub modules (like twitter cards, schema.org: JobPosting, etc.) On /admin/config/search/metatag/add I see them for certain ...
6 votes
3 answers
11k 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
2 answers
3k 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 ...
2 votes
2 answers
3k 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 ...
0 votes
1 answer
286 views

Sharing articles on Social media loses the images after posting

This seems to have only happened recently. Has anyone found a fix? I'm using D7 with Metatag, Metatag:Facebook & Metatag:Opengraph. However, I'm not convinced the issue is with any of these ...
0 votes
1 answer
1k views

How to use node field tokens as a value in Metatags module?

I am trying to optimise SEO on my site by ensuring that each page has a unique value for descriptive metatags. I am trying to achieve this using the Token and Metatags modules, and am using Drupal 8. ...
-1 votes
1 answer
276 views

I can't unverify the new owner on Google Search Console [closed]

I received a notification about a new owner into search Console. I have tried to un-verify the new owner who has been verified via meta tags. I have cleaned the website, but I can still see the meta ...
0 votes
0 answers
50 views

How to add meta tag to a hook_menu page which return json output?

I have a custom page which I have created using hook_menu $items['list'] = array( 'page callback' => 'page_callback', 'type' => MENU_CALLBACK, 'access arguments' => array('access ...
1 vote
2 answers
162 views

How to control metatag module's tags from a page callback?

I have some pages which are created by page callback functions. I'm using the metatag module. I'm on D7 I need to control the metatags output (specifically the description/og:description). This ...
3 votes
0 answers
739 views

How do I set schema.org metatag for products?

I'm using https://www.drupal.org/project/schema_metatag for my Drupal 8 + Drupal commerce 2 online store and the question is - how to configure fields and what tokens should be used to display ...
2 votes
1 answer
6k views

Meta tags not showing on front page

I'm using the module "metatag" to make my website SEO friendly. This works very well for all pages except the front page. I go to modules -> Meta tags -> Settings -> Global: Front page There I set a ...
0 votes
1 answer
171 views

How do I print a specific meta tag attribute value in html.tpl.php?

I am trying to create WebSite schema condition output in html.tpl.php in Drupal 7, so installed schema.org module, but it doesn't come with all the fields that my project required, for example, ...
11 votes
1 answer
5k views

Remove "Generator" meta tag?

How can I remove the Generator meta-tag in Drupal 8? <meta name="Generator" content="Drupal 8 (https://www.drupal.org)" /> Can this be done with few lines of code?
5 votes
2 answers
5k 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 ...
1 vote
4 answers
1k views

How can I change the front-page title when front page is not /node?

I changed the site's front page from /node to another page. However, now the title of the front page is page name | site name. To clear up any confusion, by "title," I mean the phrase ...
0 votes
0 answers
22 views

metatag_hreflang outputting extra hreflang tags [duplicate]

I need to generate hreflang tags in my website and I've installed metatag_hreflang submodule (belongs to metatag module) It's now outputting the following <link rel="alternate" hreflang=&...
0 votes
1 answer
656 views

How do I add multiple images in JSON to meet Google's schema.org requirements?

The Google guidelines for article on schema.org state: For best results, provide multiple high-resolution images (minimum of 300,000 pixels when multiplying width and height) with the following ...
9 votes
5 answers
14k 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 ...
1 vote
1 answer
841 views

How to handle the cache per user in REST Resource?

I have a requirement to expose a specific content type data via REST end point. Below is my code: public function get() { $current_user = $this->currentUser->id(); $user = $this->...
-2 votes
1 answer
317 views

amp-img tag, replace to simple img

I need to change this tag <img> to <amp-img>, I've been researching about this and I have this function for change the img tag. function amptheme_image($variables) { // Remove RDF ...
4 votes
2 answers
1k 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.

1
2 3 4 5 6