Removing logo from product pages

Anthony_DiPrima
Tourist
10 0 1

Hi, I could use some assistance in removing my logo image off my product pages in the minimal theme.  Any help would be appreciated. 

Thanks, 

Anthony

0 Likes
Jason
Shopify Expert
10039 119 1876

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;
}

 

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Anthony_DiPrima
Tourist
10 0 1

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 

0 Likes
Jason
Shopify Expert
10039 119 1876

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.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
Anthony_DiPrima
Tourist
10 0 1

Thanks Jason!!!  Looks like exactly what I need.  Appreciate all your help!

 

Anthony

 

0 Likes
mightyjoe
New Member
2 0 0

Hello,

I would like to do the same to my theme "new standard"

Can anyone help me with the coding?

Very much appreciate it!

Joe

0 Likes
meatdirect_ca
New Member
2 0 0

Screen Shot 2021-01-19 at 10.09.34 PM.png

Is this the correct spot to install the code?  I would like a smaller logo on the collection and product pages.  Just not sure where to install this code.  Thank you for the tips as they are awesome.  Trying to make this as IOS friendly as possible as 75% of my customers are using mobile. 

0 Likes
Starkey1
New Member
1 0 0

This will remove the subscription metafields that display the subscription widget.

 

 

0 Likes