Hey Anthony -
This is not a common request so I'm curious about the reasons here. It's possible that customers will land on the product page from a search so I am not 100% convinced you want to remove your branding.
If you're looking for a quick CSS based approach the styles below will do what you need. This would need to be added to the bottom of your stylesheet (theme.sscss.liquid):
/* remove logo from product pages */
.template-product .site-header__logo {
display: none;
}
Hey Jason, Thanks a lot for your help in this. I see you point!! I guess my question should have been replacing the logo on the product pages. What I really would like to do is take off the existing logo as it takes up so much of the header space and replace it with a different more compact logo.
Thanks again for any help,
Anthony
In that case you should be able to use a conditional statement. That basic logic would be like so:
{% if template contains 'product' %}
<!-- show the smaller product page logo -->
{% else %}
<!-- show the normal logo -->
{% endif %}
For your theme it should require editing theme.liquid, changing this...
<a href="/" itemprop="url">
<img src="{{ 'logo.png' | asset_url }}" alt="{{ shop.name }}" itemprop="logo">
</a>
...into something more like this. Be aware that you need to upload the other logo and adjust the filename as needed.
<a href="/" itemprop="url">
{% if template contains 'product' %}
<img src="{{ 'product-page-logo.png' | asset_url }}" alt="{{ shop.name }}" itemprop="logo">
{% else %}
<img src="{{ 'logo.png' | asset_url }}" alt="{{ shop.name }}" itemprop="logo">
{% endif %}
</a>
Hope that helps. Don't forget to make a theme copy before you attempt those edits.
User | Count |
---|---|
16 | |
16 | |
13 | |
12 | |
11 |