Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello Shopify Community,
I hope you're all doing great.
I'm currently trying to add a logo to the title of the "Photo with Text" section on my Shopify store. Could anyone provide guidance on how to do this? Specifically, I'm looking for the steps or code needed to insert a logo image within the title area.
Theme: Dawn 15
This is the page: https://c31ddd-b1.myshopify.com/pages/ila
This is the logo: it should go where the title is: https://cdn.shopify.com/s/files/1/0607/6619/1686/files/LOGO.webp?v=1718662465
Any assistance would be greatly appreciated. Thank you!
Best regards,
Hi @jborrelly
This is Richard from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> to get this solved
Step 1: Online Stores > Themes > More Actions > Edit code
Step 2: click on theme.liquid and paste the code above the </head>
<script>
window.addEventListener('DOMContentLoaded', function(){
const img = document.createElement('img');
img.src='https://cdn.shopify.com/s/files/1/0607/6619/1686/files/LOGO.webp?v=1718662465';
const heading = document.querySelector('h2.image-with-text__heading.inline-richtext.h1');
heading.appendChild(img);
})
</script>
<style>
h2.image-with-text__heading.inline-richtext.h1 {
display: flex;
justify-content: center;
align-items: center;
}
h2.image-with-text__heading.inline-richtext.h1 img{
object-fit: contain;
width: 50px;
}
</style>
Hope this can help you solve the issue
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
How can I do this without the text just the logo?
Already did thank you so much. I need to do something similar but with a rich text, I need to replace the title with this image https://cdn.shopify.com/s/files/1/0607/6619/1686/files/ready_to_represent.png?v=1720488901 on this section: https://c31ddd-b1.myshopify.com/pages/ventanas / The "Ready to represent DR" title.
Please help Thanksss