Skip to main content

Questions tagged [head]

The tag has no usage guidance.

26 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
125 views

Magento 2.2.8 not saving HTML head

Just upgraded to 2.2.8. Trying to add something into HTML head section, but it does not go to the front-end. At the same time enabling "Display Demo Store Notice" did work. Tried cleaning & ...
Alex Ambal Mulin's user avatar
2 votes
1 answer
357 views

Add extra line to head section with url as a variable

I want for every page an additional line in the head section. The extra line should look like this: <link rel="alternate" href="https://www.mywebsite.com/us/link.html" hreflang="en-US"> where "...
Ernest's user avatar
  • 21
2 votes
0 answers
2k views

Change order of CSS and JS in the <head> section of the page

Where is the block with CSS and JS in the <head></head> rendered? And how to change the order of the elements from that section? (this screenshot is from Magento 2 demo) I'd like to ...
zitix's user avatar
  • 2,192
2 votes
1 answer
601 views

Rewriting Html Head Block

Anyone have any idea why I can't rewrite the Mage_Page_Block_Html_Head block? My config.xml file looks like this: <config> <modules> <Mymodule_Robots> <...
hammygoonan's user avatar
1 vote
0 answers
49 views

Magento 2.3 How add additional links in tag <head>?

How to add information to the tag, please tell me?! I want to add .phtml file I can change the class along this path and add this way, but it seems to me that there is another way Magento\Framework\...
David Young's user avatar
1 vote
0 answers
158 views

Magento2: How to add css file in admin backend for RTL?

I want to add custom css in backend that only work when user change the Arabic language from admin side. How can I add css for backend on conditional basis? Can any one help me on this which would ...
Purushotam Sharma's user avatar
1 vote
0 answers
906 views

Remove a link tag in head tag

I never used Magento and a client of mine asked me to remove an unwanted google adsense in his website. While inspecting, I got this: <link rel="preload" href="https://adservice.google.com.br/...
Flaviano's user avatar
0 votes
2 answers
106 views

Override the canonical URL in custom layout handler

I'm attempting to override the canonical URL for a custom handler. I tried adding the following code via XML, but instead of overriding the default canonical URL, I now have both the default and the ...
Anass Hl's user avatar
0 votes
0 answers
148 views

I'm adding gtm tag in magento 2 in head from admin but it is showing inside body why?

I'm adding gtm tag in magento 2 in head from admin but it is showing inside body why? All script tag are moving in body I have (Move JS to bottom from yes to No) but it is showing in body.
kashif sohail's user avatar
0 votes
1 answer
774 views

magento 2: Add custom <script> tag in <head> section, only for specific CMS page

I have a CMS page in Magento 2, for which I want to add <script> tag that will be included in the <head> section of this page only. I do not want this <script> tag to appear on any ...
Kade's user avatar
  • 1
0 votes
1 answer
608 views

Magento 2 - Custom Head PHTML showing in body

I am trying to create dynamic head using phtml on Magento 2.3.5 p1. I am inserting in default.xml the following: <page> <body> ... <referenceContainer name="head.additional&...
archigrafix's user avatar
0 votes
1 answer
278 views

Position a block at the top of <head>

I'm using the following to add tags to my : <referenceBlock name="head.additional"> <block class="Magento\Framework\View\Element\Template" name="head.font&...
Sam's user avatar
  • 163
0 votes
1 answer
158 views

How to add js right before head tag end

I want to add js EXACTLY right before end of head tag I've try this solution, but it only put the js to middle of the head tag, not right before end of head tag https://magento.stackexchange.com/a/...
fudu's user avatar
  • 1,298
0 votes
1 answer
1k views

Magento 2 - How to add external css/script to head?

I try to add external css/javascript to the head. I added this to my theme under Magento_Theme\layout\default_head_blocks.xml: <?xml version="1.0"?> <page xmlns:xsi="http://www....
Black's user avatar
  • 3,392
0 votes
1 answer
659 views

Magento 2.3.1 - Issue with script Google Tag Manager (GTM) in <HEAD>

I am trying to implement GTM in magento 2.3.1. But i could not able to make it successful. I have used the extension WeltPixel Extension to configure GTM to my site and manually method too but when ...
Erick Amoedo's user avatar
0 votes
1 answer
253 views

Bootstrap 4 and IE11

why my BT4 isn't working on IE11 ? In default_head_block.xml I have this : <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
Morgan's user avatar
  • 945
0 votes
1 answer
138 views

I have magento 1.9.4 and running 3 stores and want to add a jv script from duda in the head

It says to add this to the head section but I don't know where it is. This is the script. DM_redirect("m.stuffwholesale.com"); I looked at the phtml which I found in the forum but I just am unsure can ...
Ron Gin's user avatar
  • 31
0 votes
1 answer
38 views

Any configuration for type of style section loaded in head tag?

Is there any configuration that makes style section loaded like this in head tag: <style data-href="http://www.website.com/pub/static/frontend/Mytheme/mytheme/fr_FR/mage/calendar.css" media="all"&...
Mirindra's user avatar
0 votes
1 answer
1k views

Add JS to head in Cart

I have a problem when I want to put JS into my head when the PHP condition is met, but I'm getting Mage_Core_Exception: Invalid block type exception no idea why. I have read all the possible issues I ...
JohnyProkie's user avatar
0 votes
0 answers
4k views

Magento2: How to add code inside the head tag?

I'm working on a Magento 2 website and I'm trying to add some code to the head tag, I already tried to add going to Content->Configuration->HTML Head and pasting the code inside "Scripts and ...
RuiVBoas's user avatar
  • 195
0 votes
2 answers
1k views

Magento 2 : How to Add Dynamic CSS Url

I need to add custom css in head dynamically, where css url is dynamic. I can add using below code but page will get cache, I need to add css dynamically each page re-fresh, css url will be also ...
Pradeep Kumar's user avatar
0 votes
0 answers
203 views

Adding script that is not in a .js file in the <head> Magento 2 without using 'misc scripts' in admin

I have some js script which I'd like to place in the section of my Magento 2 site. I do not want to add in 'miscellaneous scripts' section. I want to add this in my themes default.xml file. However, ...
YorkieMagento's user avatar
0 votes
1 answer
37 views

How do I add a js reference to the body of my page and a css reference to the head of my page?

The only place I have access to edit is: CMS > Pages > 'page' > Content Can I add a jquery reference to the body of my page like this in the content area? <body> <script src="js/jquery.min....
user3884406's user avatar
0 votes
1 answer
77 views

Magento invoice printing error after a custom theme installed

My problem is printing invoice issue,I noticed that this started since i installed a new theme, i installed a theme (from EMThemes website) and whenever i try to print a sales invoice from the ...
Powhattan's user avatar
0 votes
0 answers
634 views

Finding where CSS and JS injection is called from

In my development site, I added an extension that I have since decided to remove. Having removed all the files from the site structure, I am still seeing the css and js include files being included in ...
robgt's user avatar
  • 439
0 votes
1 answer
46 views

Cannot connect the skin file in head

I'm is beginner in magento. I try to connect the library jquery-ui, but fail! . Paths to the my custom topic: /app/design/frontend/alokuteshop/default/ /skin/frontend/alokuteshop/default/ I edit ...
  sable's user avatar