Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
2 votes
1 answer
70 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
giorgio79's user avatar
  • 4,631
0 votes
0 answers
31 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 (...
Dmytro Pastovenskyi's user avatar
0 votes
0 answers
38 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, ...
Patrick Kenny's user avatar
0 votes
1 answer
87 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 ...
Menno van den Heuvel's user avatar
1 vote
2 answers
176 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 ...
bdereta's user avatar
  • 151
0 votes
0 answers
126 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 : $...
asma supih's user avatar
-2 votes
1 answer
67 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 ...
om62's user avatar
  • 1
0 votes
0 answers
210 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 ...
Fabrice Lefloch's user avatar
0 votes
1 answer
125 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-...
user64675's user avatar
  • 101
0 votes
1 answer
128 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?
Guybrush Threepwood's user avatar
2 votes
2 answers
978 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.', '...
Patrick Kenny's user avatar
0 votes
0 answers
93 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 ...
MMT's user avatar
  • 41
0 votes
1 answer
127 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 ...
MastaP's user avatar
  • 152
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 ...
cballenar's user avatar
  • 101
0 votes
1 answer
283 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: ...
Drazen's user avatar
  • 27
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 ...
artfulrobot's user avatar
  • 4,019
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 ...
Andreas's user avatar
  • 412
0 votes
1 answer
301 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 ...
wotney's user avatar
  • 202
-1 votes
1 answer
278 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 ...
mrcniceguy's user avatar
2 votes
1 answer
971 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) ...
hotwebmatter's user avatar
  • 2,112
0 votes
1 answer
172 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, ...
udbroom's user avatar
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=&...
unixmiah's user avatar
  • 105
1 vote
4 answers
2k 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 ...
glenviewjeff's user avatar
0 votes
1 answer
668 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 ...
Patrick Kenny's user avatar
1 vote
1 answer
884 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->...
Suraj's user avatar
  • 884
0 votes
0 answers
97 views

Change meta description

I created a website for my small company and I wanted to share it on social media site. Doing so, I noted I get the Lorem Ipsum dummy text as meta description. How do I change that text?
Enzo Muho's user avatar
1 vote
1 answer
368 views

Metatag migration from html

Drupal 8.8 Modules: Metatags & Migration plus. I am trying to convert a tag in an XML file to an open graph image metatag. File: modules/custom/my_module/dataxml.html This is the url that has ...
Geordi Feijens's user avatar
0 votes
0 answers
337 views

How do I dynamically add og:image meta tags in drupal multisite

I have drupal 8 multisite setup, where I am creating multiple site using some script technique and rendering the data using domain name via twig files by fetching from dynamodb records. So my ...
Vaibhav Gidde's user avatar
0 votes
0 answers
758 views

How to change base url protocol to HTTPS?

I wanted to update the protocol of my base url to HTTPS. I have added nginx configuration to redirect all http requests to https. But in meta tag, when I choose [site:url], it returns a http url, http:...
SANGEETH KUMAR S G's user avatar
0 votes
1 answer
38 views

Show metatags on node add/edit pages on custom theme

I have a user role which can add/edit metatags (Metatag module) and when I allow overlay and admin theme access for that user role - everything is OK. But if they are editing/adding node from my ...
Ivan Ilic's user avatar
4 votes
1 answer
941 views

How can I disable meta tags provided by the Metatag module for a custom route?

I have created a custom module for displaying the players information. Module will create dynamic pages and each page will display players stats. With the help of the following links, I was able to ...
SANGEETH KUMAR S G's user avatar
0 votes
0 answers
345 views

Dynamic meta tags and description in custom pages [duplicate]

I have a custom drupal module which will generates pages for players in my site. The players stat data is meant to be updated most of the time, so for ease of use, I have created a custom module for ...
SANGEETH KUMAR S G's user avatar
0 votes
1 answer
143 views

Output og:image:url if the og:image exists

I'm working on a website with Drupal 8 and the metatags module. I need to not output the metatag og:image:url if the og:image exists. If it possible to do using the module? If not I would have to ...
André Luiz's user avatar
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 ...
Ahmad's user avatar
  • 2,835
0 votes
1 answer
217 views

Link formatter to display link title, image and summary

I know I've seen a module that does this at some point in the past but can't seem to find it right now. In Drupal 8, I have a link field. I want to fetch that link's metadata so I can display the link'...
Sean Reiser's user avatar
0 votes
0 answers
39 views

How can I get the metatag_config site name by consulting my db with php?

I want to obtain the metatag_config data through a mysql query with php from my db drupal, in order to obtain the site name, description, keywords and abtract. How can I do it? Or where they are ...
Giancarlo Lopez 's user avatar
-2 votes
1 answer
409 views

How to use apostrope in meta description

Whenever I use an apostrophe in a meta description the browser prints the code as &#039;. Is there a way to prevent this? These are coming trough a custom module that builds out the page.
MeltingDog's user avatar
0 votes
1 answer
130 views

Token for first media Image in the body

I need to display an image url in a metatag item. The problem is on one of my node types, the editors only upload an image as a media entity inside the body. What is the best way to handle this?
albertski's user avatar
  • 3,487
0 votes
1 answer
171 views

Add Open Graph Metatag in backend

I need to set the og:iamge metatag using the Metatag Module. Since there is no option for editing the names of the metatags or adding custom ones, I'm unsure if this is possible. Is it possible to ...
Michi Gruber's user avatar
0 votes
0 answers
41 views

Automatically add meta tags on node creation

I'm currently maintaining a lot of different sites containing the same information pages (example: profile pages with the same content but on different sites/base URL) and I'd like to consolidate this ...
Daniel's user avatar
  • 59
-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 ...
user3123766's user avatar
0 votes
0 answers
73 views

Description metatag from first row of the view

Okay. Current version of metatag_views does not support views data in it's tokens. The idea is to make custom handler based on Custom text, where theme() method will have the rendered text. If I put ...
menelai's user avatar
  • 77
0 votes
0 answers
85 views

Add metatag field to content type programmatically

I'm trying to create a metatag field (from the metatag module) to my content type programmatically. I know how to create a textfield to my content type (by using the node.module as example) but can't ...
Joost's user avatar
  • 1,348
0 votes
1 answer
522 views

Facebook does not use article image

We installed the metatag module, and we activated all metatag entries on the modules administration page. On the module settings we selected content type Node:article and went to Open Graph. We edited ...
MarkDQ's user avatar
  • 153
1 vote
2 answers
28 views

How can I change a page's title for each page individually?

I am wondering if there is a way that I can change the page titles so that users can see a nice title but that at the same time, the internal title of that same page be different?
Estefania Gonzalez's user avatar
1 vote
1 answer
171 views

Does the summary area support input filters?

I have noticed that text filters placed in the summary area don't seem to work, that the raw text appears in the summary info when posted in Twitter, Facebook and the like. Is that some inherent ...
vfclists's user avatar
  • 1,269
1 vote
1 answer
561 views

Customize the appearance of sharing articles to social media

I am new to Drupal and I just added a few buttons for sharing articles to social media (Facebook, Twitter etc.) I want to customize the appearance of sharing posts. After a few "research" I found out ...
Reflex Roland's user avatar
2 votes
1 answer
1k views

Metatag images don't work anymore after updating [closed]

I was on Drupal 8.5.x and Twitter cards and Open Graph on Facebook were displaying correctly. After updating to Drupal 8.6.1, the images don't display anymore. The others data (title, description, ...
Xoclaf's user avatar
  • 313
2 votes
2 answers
1k views

How do I translate a meta tag?

I want to translate the title meta tag added to views on a Drupal 8 site, but I didn't see any option in the Translate View section. How can I translate meta tags?
salu's user avatar
  • 119
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. ...
johnventions's user avatar

1
2 3 4 5 6