All things Shopify and commerce
Hi
I would like to add my logo to other pages instead of the home page.
Thanks!
Hi @Fabianoo welcome to the Shopify Community,
YOu can use the below code if you have knowledge how to deal with liquid code
{% if template.name != "index" %}
Your Logo Code will be place here
{% endif %}
Online Store > Code Edit > Header. liquid > find the logo wrap div and place that inside above code.
Thanks
Hello @Fabianoo. In dawn theme, if you add logo from theme settings, it will appear in header section. This means, it will be available in all the pages.
However, if you want to show the logo in other pages except for homepage, you need to update your liquid code. You can try the following code.
In your header.liquid file,
{{ settings.logo | image_url: width: 600 | image_tag:
class: 'header__heading-logo motion-reduce',
widths: widths,
height: logo_height,
width: settings.logo_width,
alt: logo_alt,
sizes: sizes,
preload: true
}}
replace the above code with the code below:
{% if request.path != routes.root_url %}
{{ settings.logo | image_url: width: 600 | image_tag:
class: 'header__heading-logo motion-reduce',
widths: widths,
height: logo_height,
width: settings.logo_width,
alt: logo_alt,
sizes: sizes,
preload: true
}}
{% endif %}
If you find and difficulty or have any queries, please let me know.
Faisal Ahmed | Brain Station 23
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Hi Faisal,
Thanks for the suggestion. I'm unable to locate the specific code on my header.liquid file. Are there any way i can search easily? Im using macbook
It doesn't work though
Hi @Fabianoo
I can do it for you if you are not familiar with liquid code.
Thanks
Hi @Fabianoo. I'm attaching some screenshots.
From the above image, you can see I've added an logo from theme settings, but it is not showing in homepage.
But here in collection page, the logo is appearing.
And you need to put the code here:
If you have any confusion, please let me know.
Faisal Ahmed | Brain Station 23
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
It doesnt work though...
@Fabianoo. Can you please share your code screenshot? If possible, your store URL also.
Faisal Ahmed | Brain Station 23
Step3: Again paste the code {%- if request.page_type != 'index' -%} before the line "{%- if section.settings.logo_position == 'middle-center' -%}"
Step4: Paste the code {%- endif -%} before the "header__icons" section in the attached screenshot.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024