When the store is using custom child theme design, add to wishlist is not appearing on the product page.

When I switch to other theme, it appears.

What could be the reason?


I realised that when I have catalog_product_view.xml under my custom theme in Magento_Catalog/layout, add to wishlist is not appearing.


You Just needed to copy




Under custom theme.


I had similar problem in Magento 2.3.0. In my custom theme I changed layout of catalog_product_view.xml and "Add To Wishlist" stopped showing up. Any change to the file and it wouldn't be visible. So I called it manually:

<block class="Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist" name="wishlist" as="wishlist" template="Magento_Wishlist::catalog/product/view/addto/wishlist.phtml"/>

Add it anywhere in the code but this will work only in "Product Details". If you want to show it in product listing use following:

<block class="Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist" name="wishlist" as="wishlist" template="Magento_Wishlist::catalog/product/list/addto/wishlist.phtml"/>

I didn't checked if this works properly in product listing but it should.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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