Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take 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
1 vote
1 answer
32 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.', '...
user avatar
0 votes
0 answers
26 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 ...
user avatar
  • 41
0 votes
1 answer
32 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 ...
user avatar
  • 137
0 votes
0 answers
27 views

Summary not creating output in meta tags

I have inherited a Drupal site that I can not update the modules or core. I have 500+ pages with blank meta description due to [node: summary] not working. [Node: title] works fine, and while ...
user avatar
0 votes
1 answer
14 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 ...
user avatar
  • 101
0 votes
1 answer
30 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: ...
user avatar
  • 31
2 votes
1 answer
78 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 ...
user avatar
  • 3,909
0 votes
0 answers
12 views

How to add Views total rows count in page title?

I want to add the total rows count in my page title (not the view title). Tried using the metatag module for that, but instead of [view:total-rows] token, which is shown as supported for the title ...
user avatar
  • 79
0 votes
1 answer
16 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 ...
user avatar
  • 271
0 votes
0 answers
15 views

Metatag image secure_url - how to find from where it comes from?

From where: <meta property="og:image" content="https://example.com/sites/default/files/2021-06/example.jpg"> <meta property="og:image:url" content="...
user avatar
  • 173
0 votes
2 answers
104 views

Can't set custom document title in theme-settings.php

I'm a newbie with Drupal, so I'm not sure I do everything correctly. I need to set custom document title (i.e. between <title> and </title>), not in a module, but in another PHP file for ...
user avatar
  • 123
0 votes
1 answer
67 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 ...
user avatar
  • 181
-1 votes
1 answer
122 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 ...
user avatar
1 vote
1 answer
227 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) ...
user avatar
  • 1,939
0 votes
1 answer
54 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, ...
user avatar
0 votes
0 answers
20 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=&...
user avatar
  • 107
1 vote
4 answers
883 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 ...
user avatar
0 votes
1 answer
203 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 ...
user avatar
1 vote
1 answer
133 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->...
user avatar
  • 844
0 votes
0 answers
56 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?
user avatar
1 vote
1 answer
166 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 ...
user avatar
0 votes
0 answers
198 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 ...
user avatar
0 votes
0 answers
142 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:...
user avatar
0 votes
1 answer
27 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 ...
user avatar
3 votes
1 answer
472 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 ...
user avatar
0 votes
0 answers
339 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 ...
user avatar
0 votes
1 answer
99 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 ...
user avatar
0 votes
0 answers
41 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 ...
user avatar
  • 2,697
0 votes
1 answer
145 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'...
user avatar
0 votes
0 answers
37 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 ...
user avatar
-2 votes
1 answer
263 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.
user avatar
0 votes
1 answer
64 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?
user avatar
  • 3,247
0 votes
1 answer
36 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 ...
user avatar
0 votes
0 answers
29 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 ...
user avatar
  • 59
-2 votes
1 answer
286 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 ...
user avatar
0 votes
0 answers
60 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 ...
user avatar
  • 77
0 votes
0 answers
68 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 ...
user avatar
  • 894
0 votes
1 answer
460 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 ...
user avatar
  • 141
1 vote
2 answers
18 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?
user avatar
1 vote
1 answer
109 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 ...
user avatar
  • 1,269
1 vote
1 answer
355 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 ...
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, ...
user avatar
  • 303
1 vote
2 answers
828 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?
user avatar
  • 109
0 votes
2 answers
983 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. ...
user avatar
0 votes
1 answer
51 views

Adding meta tag to a view

I am working with Drupal 8. I want to add meta tags for title and description for a view. Is there any option?
user avatar
  • 109
0 votes
1 answer
41 views

Common meta tag description for a particular content type

I am working with meta tag module in drupal8.I want to add common meta title and description for a particular content type.How can i do this?
user avatar
  • 109
5 votes
1 answer
5k 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 ...
user avatar
  • 489
1 vote
0 answers
23 views

Read opengraph property and use as field title

I have a simple site that generates an article content in the page. This content is a link preview of the article URL. My goal is when an article is created I want to use metatag property sitename as ...
user avatar
0 votes
1 answer
44 views

disable translatable route object

I've developed a module which generates and displays dynamic content. The title of the page is also generated dynamically in the controller as show below: if ($route = $request->attributes->get(...
user avatar
0 votes
1 answer
681 views

can you put views field values into a global token?

Suppose I want to use a paragraph field value of an entity for metatag title (by using metatag views module) I can successfully get the value of the paragraph entity and display it on the view Now, ...
user avatar
  • 105

1
2 3 4 5 6