Questions tagged [meta-tags]
The tags placed in the <head> element to provide meta information about the document are called meta-tags.
268
questions
0
votes
0
answers
30
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, ...
0
votes
1
answer
44
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 ...
1
vote
2
answers
95
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
57
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
53
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 ...
0
votes
0
answers
140
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 ...
0
votes
1
answer
93
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-...
0
votes
1
answer
96
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?
2
votes
2
answers
656
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
0
answers
70
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
105
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
22
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
191
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
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 ...
0
votes
1
answer
65
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 ...
0
votes
1
answer
248
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 ...
-1
votes
1
answer
270
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 ...
2
votes
1
answer
785
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
166
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, ...
0
votes
0
answers
21
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=&...
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
1
answer
587
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
...
1
vote
1
answer
678
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
0
answers
83
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
1
answer
342
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
0
answers
323
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
0
answers
651
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
1
answer
35
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 ...
4
votes
1
answer
802
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
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 ...
0
votes
1
answer
126
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
0
answers
48
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
1
answer
188
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
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 ...
-2
votes
1
answer
373
views
How to use apostrope in meta description
Whenever I use an apostrophe in a meta description the browser prints the code as '. Is there a way to prevent this?
These are coming trough a custom module that builds out the page.
0
votes
1
answer
118
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
1
answer
86
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
0
answers
40
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
1
answer
315
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
0
answers
72
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
0
answers
82
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
1
answer
514
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
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?
1
vote
1
answer
159
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
1
answer
499
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
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, ...
1
vote
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?
0
votes
2
answers
1k
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
109
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
1
answer
47
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?