Shopify themes, liquid, logos, and UX
Hello, the improvements and integrations on the Shopify inbox app have been amazing.
One key feature that would be crucial, is the availability to hide the 'chat with us' widget , on certain pages. Some pages really need the chat button, others, it can be very distracting
I hope i can find some help on how to solve this. Thank you
Hey @heskew
This can be done with some extra code, send me the URL and the page you want to hide the widget from
Thank you, sending now
Go to theme.liquid and at the end of your closing head tag
</head>
add the following code
{% if page.handle == 'cg-essential' %}
<style>
#shopify-chat-dummy{display:none !important;}
</style>
{% endif %}
replace "cg-essential" with the handle of the page you want to hide it from.
Can you please share the entire code?
@ErikLima Send me your link
Hi Gang - Any chance there's a code to exclude it from anything but a product or checkout page?
Thanks in advance!
Jared
Hi - I'm trying to remove the chat option from appearing on my blogs. What would I need to edit in your example to make this work? Thanks
Hi @SidouLF and @heskew, how would I apply this code to all blogs on the website? I have several different blog categories, and I would like to turn off chat for all of them. Do I need to list them all separately or can I disable the chat button for all blogs?
Here is example code to try to disable the "oregano oil and organic skincare" category:
</head>
{% if blog.handle == 'oregano-oil-and-organic-skincare' %}
<style>
#dummy-chat-button{display:none !important;}
</style>
{% endif %}
It doesn't seem to be working. Does the code belong within the <head></head> tag or just after it?
Thanks for your help!
You should be able to remove it from all blogs by just using the {% if blog %} but I am not 100% certain on that. It seems to me that the chat is loaded after everything else. So I made a workaround you add an `id=` inline to your body tag in your `theme.liquid` file
<body
{% if blog.handle == 'oregano-oil-and-organic-skincare'}
id="a-blog"
{% endif %} >
...lots of code here
</body>
Then in your custom.css file you can add the css to remove it
#a-blog #dummy-chat-button-iframe {
display: hidden !important;
visibility: hidden !important;
}
Hello dear thanks for it !
On the contrary if we want to display it only in ONE page, only the homepage do you know what kind of code it is please ?
Thanks !
Here is a workaround you add an `id=` inline to your body tag in your theme.liquid file
<body
{% if blog.handle != 'home'}
id="not-home"
{% endif %} >
...lots of code here
</body>
Then in your custom.css file you can add the css to remove it
#not-home #dummy-chat-button-iframe {
display: hidden !important;
visibility: hidden !important;
}
Can you help me as well please, I tried inserting the code bellow but still cant make it hide from that page.
{% if page.handle == 'sistema-de-puntuacion' %}
<style>
#shopify-chat-dummy{display:none !important;}
</style>
{% endif %}
Can you help me add the Shopify Inbox to only one page on my website? I only want the chat widget to show on https://www.projecthomediy.com/pages/firstbox50 this page.
Can you do this for me? 😄
My solution isn't necessarily URL specific but rather template specific!
For example, if you would like to hide the Shopify chat widget on article pages! You'll need to go to Themes>Edit code and then search for the "article.liquid" template in sections folder.
At the top of the section, insert the code below:
<style>
#shopify-chat {
display: none !important;
}
</style>
The above code should work for any template you'd like to hide the chat widget on.
If you are looking to hide the widget on a specific page, you'll need to have slightly more developer knowledge. You'll need to use handles!
Handles link:
https://shopify.dev/api/liquid/basics
Hope this helps (:
This is the only thing I found that works. Thanks heaps! For me the section template was 'main-article.liquid' not 'article.liquid' though.
We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024