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
0answers
10 views

metatag_hreflang outputting extra hreflang tags

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=&...
2
votes
4answers
189 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
1answer
17 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 ...
0
votes
0answers
14 views

Meta-tags doesn't work in Views

I dont know why the meta-tags is not working in Views. I'm using the Meta-tag Version: 7.x-1.27 My views version: Version: 7.x-3.24 I try to change the views meta tag to any text, but it is still not ...
1
vote
1answer
65 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->...
0
votes
0answers
43 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?
1
vote
1answer
21 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 ...
0
votes
0answers
53 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 ...
0
votes
0answers
34 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:...
0
votes
1answer
19 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 ...
3
votes
1answer
120 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 ...
0
votes
0answers
91 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 ...
0
votes
0answers
13 views

Add property to schema_article_author (schema_metatag)

I want to add the property honorificSuffix to the authors of an article. Since the author is not a group in terms of schema_metatag definitions, i cannot add the field, as shown via ...
0
votes
1answer
43 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 ...
0
votes
0answers
26 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 ...
0
votes
0answers
30 views

Open meta tag tab by default

Is it possible to open the meta tag tab by default on each of my content (pages and articles) only through admin section ? To have this when I create/edit a content:
0
votes
0answers
31 views

How can I change the value of the og:image meta tag?

I want to change the value of og:image property for below tag programmatically. <meta property="og:image" content="https://example.com/sites/default/hotelier_in/styles/themes/hotelierindia/logo....
0
votes
0answers
24 views

Wrong path of Image for property = “og:image” of meta tag in content view source

I have uploaded an image in my content. When I checked view source of the page, it shows the wrong image path for og:image property of meta tag. After uploading the image in my content, image path ...
0
votes
1answer
27 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'...
0
votes
0answers
35 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 ...
-2
votes
1answer
64 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.
0
votes
1answer
34 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?
0
votes
1answer
28 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 ...
0
votes
0answers
23 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 ...
-2
votes
1answer
196 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 ...
0
votes
0answers
48 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 ...
0
votes
0answers
53 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 ...
0
votes
1answer
269 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 ...
1
vote
2answers
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?
1
vote
1answer
62 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 ...
1
vote
1answer
171 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 ...
2
votes
1answer
800 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, ...
1
vote
2answers
452 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?
0
votes
2answers
546 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
1answer
28 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?
0
votes
1answer
34 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?
5
votes
1answer
3k 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 ...
1
vote
0answers
19 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 ...
0
votes
1answer
35 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(...
0
votes
1answer
553 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, ...
0
votes
1answer
104 views

How can i remove duplicate encoding meta tag

I have repeated charset meta tag in all my drupal pages. I have been using my metatag module. To optimize SEO results, this error is reported as primary to fix. I have used jquery(ready & load ...
1
vote
0answers
96 views

Reduce or Remove duplicate data in metatag table

We are using Metatag 7.x-1.7. Our current metatag table is 1.6 GB's. I'm trying to reduce this table significantly. I've looked for solutions that may have already been brought up for size reduction ...
1
vote
0answers
114 views

Paragraph fields as node tokens in Drupal 7

Is there a Drupal 7 equivalent to [node:field_paragraph:0:entity:field_hero_image]? I'm trying to use an image field in a paragraph as the og:image using the Metatag module, but the only token I can ...
3
votes
1answer
477 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 ...
0
votes
1answer
69 views

What is the proper way to cache a http header tag?

I find examples of adding a header meta tag, such as using an event subscriber or using hook_page_attachments. The problem I have is that both of these methods add the tag only in the case of an ...
2
votes
1answer
195 views

How to increase meta tag description field to 320 characters?

We are using metatag v8.x-1.5 on our D8 site (v8.5.3). When filling out the metatag description field, we enter any where from 180-320 characters into the field. However, when the page is displayed it ...
2
votes
2answers
2k 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 ...
2
votes
0answers
406 views

How to set schema.org metatags for products in Drupal Commerce 2?

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 ...
0
votes
0answers
92 views

Use custom metatag generated from reactjs code

I have a chart layout used in ContentTypeX Manage Display. Using reactjs, this chart is converted into an image using toDataURL process. Now I have a Rule that creates a Post content with the URL of ...
0
votes
1answer
109 views

Remove “<em> edit Article </em>” and [current-page:pager]

I'm working on a Drupal 7 site in which I'm using Meta tag module for SEO purpose. I have configured the meta-tags global and content settings. When I try to edit a node for a content type, for ...

1
2 3 4 5 6