Magento2 Toplinks – Removing Wishlist Link from Top Header

magento2toplinkswishlist

I've seen this question asked time and time again, and i know this will sound like a duplicate. But every answer everyone else has doesn't work for me.

I'm using:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="top.links">
            <referenceBlock name="wish-list-link" remove="true" />
        </referenceBlock>
    </body>
</page>

To try and remove the wish-list-link from the top link set, but this doesn't seem to work, i understand that im in the right block but i assume im not targeting the correct 'wish list link' – I understand i can disable the module but i might need the module further down the line, so this really isn't an option for me.

Any help would be great.

Just to note im also inside of my theme, inside of…

/Vender/Theme_name/Magento_Theme/layout/default.xml

Best Answer

app/design/frontend/vendorName/themeName/Magento_Wishlist/layout/default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="wish-list-link" remove="true" />
    </body>
</page>

It works!