Changing the theme name to a random name is possible by creating a child theme that extends the Pearl Theme. That can be implemented by following magneto documentation on how to create a child theme.
If it is easier for you, you could use the child theme that already comes with Pearl Theme pack by following the steps below;
1. Go to the child theme that is already created under /app/design/frontend/Pearl/weltpixel_custom and copy it under a new location, for example: /app/design/frontend/MyTheme/my-theme/
2. Go to /app/design/frontend/MyTheme/my-theme/theme.xml and modify the theme title from 'Custom Pearl Theme for Magento 2' to "Random Name Theme" so you can recognize it in the Magento admin. Do not change the parent theme, keep it Pearl/weltpixel.
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Random Name Theme</title>
<parent>Pearl/weltpixel</parent>
<media>
<preview_image>media/preview.png</preview_image>
</media>
</theme>
3. Go to /app/design/frontend/MyTheme/my-theme/registration.php and change the newly created theme path from 'frontend/Pearl/weltpixel_custom' to 'frontend/MyTheme/my-theme'
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/MyTheme/my-theme',
__DIR__
);
4. Go to developer mode, do a static content deploy, clear cache.
php bin/magento deploy:mode:set developer
php bin/magento setup:static-content:deploy
php bin/magneto cache:flush
5. Set your new theme from Magento Admin and Regenerate Pearl Theme LESS/CSS files from the Cache Management section.
6. Check your store-front. Just click inspect -> View page source. You should be able to see the files loaded under your new theme name.
Comments
0 comments
Please sign in to leave a comment.