Questions tagged [header]

Denotes Question related to header part of magento.

Filter by
Sorted by
Tagged with
14
votes
1answer
23k views

Magento 2 Override default header template

I have created my own theme by extending the Magento/Blank theme. Now want to override the default header template files link.phtml, topmenu.phtml, header.phtml which is located at vendor/module-...
12
votes
2answers
19k views

How to add or remove header.links in magento2?

I am searching header.links block to remove one link and add some links but I am not getting where to make changes. Suggest me some solution
10
votes
2answers
404 views

Override header Content and adding block

I have extended LUMA theme and want to customize header. I want to add static block before logo and want to move logo to center of page which is on left side. Final result will be [1] static ...
8
votes
4answers
8k views

How to fix: “HEADER ALREADY SENT” and GD2?

This is a follow on to the question on How to debug: HEADER ALREADY SENT and GD2. Specifically how to fix the following errors (note first line had been added using previous debug advice to track the ...
7
votes
8answers
9k views

cannot read property 'section loadurl' of undefined

I'm getting this error on the firebug while loading homepage. Due to this error the pages are not loading fully. only the Header, Nav Menu and Footer and showing. The main content sections are not ...
7
votes
1answer
603 views

Header and footer in an external file

I'm using an index.php file under /pub/custom folder, which is used to create custom designs. This file is completely written in html and javascript. Is there any way to include current theme ...
6
votes
2answers
13k views

Removing Welcome message from magento 2 - just xml

I've started to work on Magento 2 and get my head around it, I'm really familiar with Magento 1 and removing the welcome message was no big deal. However all I've found the location of the welcome ...
6
votes
3answers
8k views

Disable cache on a block

Out of despair, I ask question here. I have a phtml (top_links.phtml) file that is cached when I am not logged in but not cached when I am logged in. I need it to be never cached as I display the ...
5
votes
3answers
10k views

Removing Header and Footer from CMS page

is it possible to remove both the header and footer and only display the contents of a CMS page? If so, how? Currently the html looks something like this by default: <body class=" cms-page-view ...
5
votes
8answers
12k views

How to add hreflang tags (or other meta tags) to pages in magento?

Hi using info from this site and around the web I have started to add hreflang tags to my magento store. They work and display as they should on the default (American)site, however on the alternate (...
5
votes
5answers
21k views

how to show my account link in header after successfully login in magento 2.0

how to show my account link in header after successfully login in magento
5
votes
2answers
5k views

Magento 2 - Remove Currency Switcher

I'm trying to remove the currency switcher from the header in Magento 2 with little luck. I've tried this in my theme's default.xml file <referenceBlock name="store.settings.currency" remove="true"...
5
votes
3answers
3k views

How to debug: “HEADER ALREADY SENT” and GD2?

I have an annoying HEADER ALREADY SENT error in system.log. It is not easy to debug it, what I could do was to improve the logging to isolate the source of the issue (has described here): Cannot ...
5
votes
2answers
4k views

Magento 2: What is Offloader header?

What is the use of Off loader header in CDN? What is the difference between SSL_OFFLOADED & X-Forwarded-Proto. When to use it? Is there any other type as well apart from above two?
5
votes
2answers
11k views

Magento 2 page-header background color

I want to change the background color to black on luma theme page-header. i am using luma as my default template - what is the best way to go about? - I am using github version fresh Magento 2 ...
5
votes
1answer
6k views

How can I move compare product link in header | Magento 2

How to move compare product link into header, Right now it is in top links. So to do so I've tried putting following line in my default.xml <move element="compare-products-link" destination="...
5
votes
1answer
7k views

Magento custom module adds HTML to header

I try below code is working for add a phtml file in header of Magento. <reference name="header"> <block type="your_module/yourblockclass" name="yourblockname" template="your_module/...
4
votes
1answer
20k views

Add block in header layout

I have added my custom module block in header in layout like below pinsearch.xml <default> <reference name="header"> <block type="core/template" name="pinsearch" as="...
4
votes
2answers
17k views

Magento 2 create new page header section

I am new to Magento2 and I am confused how to proceed when I want to rewrite default part of the Luma theme page completely. For example the header - I want to rebuild it from scratch, adding whatever ...
4
votes
1answer
8k views

Magento 2: Add block above page-header

I tried to add a simple div into my Magento 2 theme. I've added this code to /app/code/design/frontend/MyCompany/MyTheme/Magento_Theme/layout/default.xml <page xmlns:xsi="http://www.w3.org/...
4
votes
5answers
9k views

Magento 2: get customer().lastname in header.phtml

I don't get how this works. I'm trying to edit the header of my Magento 2 store (Magento_Theme/templates/html/header.phtml) and I'm trying to retrieve my customers lastname like this: <span data-...
4
votes
2answers
1k views

How to create custom header in magento 1.9

I want to create the custom header in Magento 1.9. I attached the screenshot of the header like this I have tried the following code. I have created the static block and static block calling in ...
4
votes
2answers
2k views

How to remove class `page-header` of tag `header` in Magento2?

How to remove name css page-header in tag header ? How to remove tag <div class="panel wrapper"> or <div class="panel header">in Magento 2?
4
votes
2answers
2k views

Header not show after update to magento 2.1

I had Magento 2.0.7 installation and my site worked fine. Then recently I updated my site to Magento 2.1.0 and header section on my site is not visible now What could be the issue.
4
votes
1answer
831 views

Magento 2: How to disable caching for the header block?

I just go through other similar questions but they didn't help much. As per suggested in some answers to put the cacheable="false" in block will disable it. But it will disable whole page caching as ...
4
votes
3answers
256 views

Header Links showing twice under the Account Links in Mobile Menu Magento 2

I am getting Header Links twice under the Account Links in Mobile Menu. I have attched screenshot of that. You can see in the image there is twice header links under account tab. I'm using porto theme ...
4
votes
1answer
934 views

Customer name is missing in welcome message after login

In header, there is a welcome message which can be configured in the Magento backend. However after login, i found that the customer fullname is not insert into the welcome message,(i.e. always ...
3
votes
3answers
15k views

Adding a class to block Magento 2

I have the following custom xml inside of my Magento_theme > layout > default.xml <referenceBlock name="top.links"> <block class="Magento\Framework\View\Element\Html\Link" name="...
3
votes
2answers
858 views

How to use customer token to access my account Query or Mutation in GraphQl

I am using magetno 2.3.x and I want to access my account queries provided by Magento_CustomerGraphQl module. I have installed ChromeiQl to execute GraphQl. I set Site Endpoint as per syntax provided ...
3
votes
2answers
1k views

Extend Header (logo, search box and cart) in Magento 2

I am trying to extend the Header (logo, search box and cart), but those files are the different location. I don't know how to adjust those. Could you please suggest me on this.
3
votes
2answers
2k views

After logging in, the user name is not displaying in header section

After logging in, the user name is not displaying between 'Wilkommen' and 'Anmelden' . Which files are responsible for rendering out this part of the header ? How to get the user name of the ...
3
votes
1answer
5k views

Magento 2 theme header - Welcome message

I've been learning the ropes in theming in magento 2, I've started to get the hang of it with my own theme using Snowdog as my parent and styling in sass. My question is, I came to remove the welcome ...
3
votes
1answer
63 views

Moving header links in Magento 1.9

I need to move header links in header. For example I need that link "log in" to be first. How I can do this?
3
votes
1answer
701 views

How to Add a “picture” Link next to the logo in the Header?

I am in charge of a Magento website created by a former guy and I followed this tutorial to add a new Picture Link in my header : https://kamaradski.com/831/how-to-add-a-picture-link-in-magento-...
3
votes
1answer
139 views

Magento 2: Customer name not display in programmatically logged in user account

I have programmatically logged into the customer accounts from my custom controller. In this case the customer name is not loading in the header. https://prnt.sc/nzucg9 How can I do it? Here is the ...
3
votes
1answer
894 views

Checkout page header is not coming [duplicate]

I have made a custom theme in magento 2 all is doing well but in the customer checkout page i don't get my header footer is there but the header is missing. can anyone help me to get out of this.
3
votes
2answers
10k views

How do I change the welcome message in Magento 1.9+ the proper way?

I would like to change the welcome message to just show initials. Clearly I can do something in the template, however, I would like to extend/over-ride Mage_Page_Block_Html_Welcome to do this 'the ...
3
votes
3answers
4k views

How to add block into header before all elements (before logo, search, …) via layout xml?

I can not find a way to add custom block before logo and all header elements. <reference name="top.container"> <block type="company_name/module" name="page_header" before="-" /> </...
3
votes
1answer
4k views

How do I add a customer logged in menu to a page from the local.xml file

I am working on getting a menu appearing in a magento template in the header.phtml file. In my local.xml file I have the following code: <!-- ################### LOGGED IN ################### --&...
3
votes
5answers
3k views

Reorder Top Links

I have been stuck on this task all day. I am hoping someone has some insight or is this a bug? I have tried a few different approaches and nothing seems to actually work. This is how it currently ...
3
votes
1answer
2k views

How to setup AWS Cloudfront for Magento 2

I have been looking everywhere for a solution, and I was following the following documents to achieve this task. https://absolutecommerce.co.uk/magento2-aws-cloudfront-cdn Here they mention ...
3
votes
4answers
4k views

Magento 2 - Header: Logo, Nav, and Mini Cart on one line

I am using Magento 2.0 with a copy of the blank theme. I am trying to get the logo, nav, and mini cart on one line but I can't figure it out. How would I do this with the blank Magento theme?
3
votes
1answer
507 views

How center a “picture link” in the header

I am in charge of a Magento website created by a former guy and I followed this tutorial to add a new Picture Link in my header : https://kamaradski.com/831/how-to-add-a-picture-link-in-magento-...
3
votes
1answer
794 views

Defer JS / CSS Magento 2 via layout files?

After reading a lot of devdocs, I can see there is a case for deferring in CSS and JS in the manual https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-types.html#layout-types-...
3
votes
0answers
114 views

After logout, customer name still shows in header beside Sign In link

The login user session is expired but in the header, the customer username is showing as logged in. Please help me to resolve this.
3
votes
0answers
37 views

How to use symbolic(symlinks) files in root directory - Change header and footer for second store

I have created symbolic(symlinks) files for multi-store, how can i change the header and footer for my second store?
3
votes
1answer
218 views

Magento 2.1.1 how to add version number to css

I want to add ?v=20170721 after css file http://example.com/pub/static/_cache/merged/91eeca7a8ffa88b106ef85bd3a665d93.min.css?v=20170721 I tried to set "yes" in sign static files but this is not ...
2
votes
5answers
16k views

How to get Session CUSTOMER ID outside Magento

Hereby, I working in PHP Outside Magento Folder.Here I need to get Session values like Customer ID into Outside Magento.Here I working this sample code in outside Magento. <?php // Your Magento ...
2
votes
2answers
5k views

how to add minicart in custome header block in magento2

i have created block in theme in magento2. block location is "theme-folder/template/html/header.phtml". i want to add minicart in this Phtml file.
2
votes
2answers
3k views

Fixed Headers in Magento

I want to fix my header for my magento site. Please get me some solutions so that I will be helpful

1
2 3 4 5
7