Shopify themes, liquid, logos, and UX
Hello all,
I would like to change the logo on a specific page, however I am having some trouble on where the code should be placed, and what is needed to actually make it change.
The current code I have placed is in theme.liquid
{% if collection.handle == "halloween" %}
<style>
.header__logo-image{
background-image: url(https://cdn.shopify.com/s/files/1/1779/2423/files/Toptoys2u_Halloween_Logo.png?v=1696421350) !important;
}
</style>
{% endif %}
Unfortunately, this does not change the logo on this specific page, and it keeps the same logo that is everywhere on the site.
Would anyone be able to alter the code (or update the location, maybe theme.css will work), to update the logo on a specific page?
The website can be found here: https://toptoys2u.co.uk/collections/halloween
I highly appreciate any help!
Try like this:
.theme-store-id-871 .header__logo-image{
content:url(https://d3k81ch9hvuctc.cloudfront.net/company/SgUnyB/images/be8215e3-13fb-4526-931a-635a4d1a5fc2.png)!important;
}
Place it inside the section "Custom CSS" in your theme editor
Hello @SItaliaCompany
Unfortunately this has not changed anything as it says the code is not applicable to the page.
Please see the screenshot below.
It is very strange why the asset does not change.
Try to paste it at the bottom of your theme.css
Hello @SItaliaCompany
Still no luck unfortunately.
Due to the identifier ".theme-store-id-871", would this apply the change to the entire site or just this specific page?
the identifier is the only way to make it work only for halloween page, maybe try this:
.theme-store-id-871 .header__logo-image{
content:url("https://d3k81ch9hvuctc.cloudfront.net/company/SgUnyB/images/be8215e3-13fb-4526-931a-635a4d1a5fc2.png");
}
Hello @SItaliaCompany
Still no luck unfortunately, with the code being placed in both the theme.css, or the theme editor together, or individually.
I have tried this with
.header__logo{
background-image: url(https://cdn.shopify.com/s/files/1/1779/2423/files/Toptoys2u_Halloween_Logo.png?v=1696421350) !important;
}
But still no luck.
Hello @SItaliaCompany
I have managed to add a new image into the background, but the main logo is still there, and the image is also not the correct resolution.
Please see the code here for reference:
Would you know how to remove the current logo on this page?
Hi @Toptoys2uHS
Try using the above video.
Hello @gr_trading
Thank you for your video.
Unfortunately, I tried the information provided in this video earlier today, and it gave no luck in updating the logo on the page, so I decided to create a new thread for this issue.
Screenshot is here for reference:
Would you have any other solutions?
User | RANK |
---|---|
203 | |
171 | |
80 | |
58 | |
48 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023