Magento2: Overriding core files - for example topmenu
Topmenu in Magento2 is generated from Block php file. That means when you want to override core Topmenu and make some changes to it, you need to create your own module.
Module structure
app/code/Customgateway/Topmenu/Block/Rewrite/Html/Topmenu.php
(original file is under /vendor/magento/module-theme/Block/Html/Topmenu.php)
To fix this, under your own theme in file /htdocs/app/design/frontend/Customgateway/entertainer/Magento_Theme/layout/default.xml
change
to
after you upload files to server, do this php bin/magento setup:upgrade bin/magento setup:di:compile sudo chmod 777 var -R sudo chmod 777 pub -R
probably you would need to deploy static content again php bin/magento setup:static-content:deploy en_GB --theme Magento/backend php bin/magento setup:static-content:deploy en_GB --theme Customgateway/entertainer (your own theme)