Re: how to add a logo to other pages only (Dawn theme)

how to add a logo to other pages only (Dawn theme)

Fabianoo
New Member
15 0 0

Hi 

I would like to add my logo to other pages instead of the home page. 

Thanks!

Replies 10 (10)

Liquid_xPert_SJ
Shopify Partner
1317 140 199

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.

 

2024-02-02 10_14_54-bisabrandpk · Edit ~ Dawn · Shopify.png

Thanks

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.

BrainStation23
Shopify Partner
413 62 60

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

Brain Station 23 PLC (Mail: js.sbu@brainstation-23.com)
- Was your question answered? Mark it as an Accepted Solution
- Did the solution not address your concern? We kindly request that share or mail your store URL with us this will enable us to collaborate more closely.
- Explore our Shopify public apps
Fabianoo
New Member
15 0 0

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 

Fabianoo
New Member
15 0 0

It doesn't work though

Liquid_xPert_SJ
Shopify Partner
1317 140 199

Hi @Fabianoo 

 

I can do it for you if you are not familiar with liquid code.

 

Thanks

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
BrainStation23
Shopify Partner
413 62 60

Hi @Fabianoo. I'm attaching some screenshots.

 

home.PNG

From the above image, you can see I've added an logo from theme settings, but it is not showing in homepage.

collection.PNG

But here in collection page, the logo is appearing.

Brain Station 23 PLC (Mail: js.sbu@brainstation-23.com)
- Was your question answered? Mark it as an Accepted Solution
- Did the solution not address your concern? We kindly request that share or mail your store URL with us this will enable us to collaborate more closely.
- Explore our Shopify public apps
BrainStation23
Shopify Partner
413 62 60

And you need to put the code here:

code.PNG

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

Brain Station 23 PLC (Mail: js.sbu@brainstation-23.com)
- Was your question answered? Mark it as an Accepted Solution
- Did the solution not address your concern? We kindly request that share or mail your store URL with us this will enable us to collaborate more closely.
- Explore our Shopify public apps
Fabianoo
New Member
15 0 0

It doesnt work though...

BrainStation23
Shopify Partner
413 62 60

@Fabianoo. Can you please share your code screenshot? If possible, your store URL also.

 

Faisal Ahmed | Brain Station 23

Brain Station 23 PLC (Mail: js.sbu@brainstation-23.com)
- Was your question answered? Mark it as an Accepted Solution
- Did the solution not address your concern? We kindly request that share or mail your store URL with us this will enable us to collaborate more closely.
- Explore our Shopify public apps

Vinsinfo
Shopify Partner
468 160 162
Hi, Hopefully below instruction will help you, please let me know if you have any questions
 
1. We need to add condition on header.liquid file to achieve this.
2. From the store admin panel, go to "Online store" -> "Themes" -> "Edit code".
3. Go to header.liquid usign the search bar.
header-code.png

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.

header-code-1.png

Please reach out to bizdev@vinsinfo.com for any enquires related to Shopify.
Our Services: Custom Theme Development, Theme Customization, Custom Feature Implementation, Data Migration, Custom APP Development, Website Optimization and Google Merchant Center Support