I am new to Magento, and am modifying Magento 2.2. There is a element at the top of the page which I cannot get it removed. This is what I have already done:

  1. I have tried to remove the content within the CustomTheme > Magento_Theme > template > html > header.phtml , but even removing the entire content in this file will not remove the element.

  2. I tried to remove the element through the default.xml in my custom template, using the following code:

     <referenceBlock name="authorization-link" remove="true" />

But I am guessing I am using the wrong reference block name since the code did not remove it.

Any help would be greatly appreciated, also note that this is appearing after the customer is logged in. I have attached a screenshot showing what element I want to remove, thank you.

Showing the ul element to be removed

  • have you tried clearing cache and redeploying static content after above code?
    – MTM
    Feb 23, 2018 at 7:30
  • Yes, I have flushed out the cache through both Magento admin itself and through SSH, I also removed the Static folder completely along with other cache folders in the (MainMagentoFolder > Var), and deployed again, but it did not help.
    – Bondsmith
    Feb 23, 2018 at 15:01

2 Answers 2


if you can't find a way to remove it from xml file, you can try to add custom css file and javascript file to default.xml, the css will hide the <ul> element first then remove the <ul> element using javascript function.


<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <css src="css/custom.css"/>
        <link src="js/custom.js"/>


  display: none;


], function($){
  $( document ).ready(function() {
  • Thank you for the comment, I have already created some custom CSS on multiple pages, but I am trying to avoid removing elements through CSS if they are never to be used.
    – Bondsmith
    Feb 23, 2018 at 2:48

I have found the answer my own question:

I could remove the element by overriding the customer.phtml within the CustomTheme/Magento_customer/templates/account/customer.phtml

Note that it did not remove the <ul> element, but I could get to remove the content within the <ul> so it does not load anymore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.