What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: How do I make shopify inbox chat message only available on blog pages

Solved

How do I make shopify inbox chat message only available on blog pages

amoss-merch
New Member
5 0 0

Hey guys, does anyone know how i can make the shopify inbox app only show up on my specific blog page and blog posts? At the moment its on every page but I have blogs behind a paywall and only want active members to have access to the chat feature. Thanks

Accepted Solution (1)

DaisyVo
Shopify Partner
1055 134 147

This is an accepted solution.

Hi, 

If you want a quick workaround for this, you can add this code to the theme.liquid file of your theme, right before the closing of body tag: https://go.screenpal.com/watch/cZXOD5nVdu4

Here is the snippet:
<!-- Show the Shopify inbox only on blog page -->
<script>
if (!['blog', 'article'].includes(ShopifyAnalytics.meta.page.pageType)) {
const style = document.createElement('style');
style.innerHTML = `#shopify-chat {display: none}`;
document.head.appendChild(style);
}
</script>
<!-- Show the Shopify inbox only on blog page END -->

Hope that this helps.

Regards,
Avada team

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

View solution in original post

Replies 4 (4)

Moeed
Shopify Partner
6357 1721 2081

Hey @amoss-merch 

 

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


amoss-merch
New Member
5 0 0

DaisyVo
Shopify Partner
1055 134 147

This is an accepted solution.

Hi, 

If you want a quick workaround for this, you can add this code to the theme.liquid file of your theme, right before the closing of body tag: https://go.screenpal.com/watch/cZXOD5nVdu4

Here is the snippet:
<!-- Show the Shopify inbox only on blog page -->
<script>
if (!['blog', 'article'].includes(ShopifyAnalytics.meta.page.pageType)) {
const style = document.createElement('style');
style.innerHTML = `#shopify-chat {display: none}`;
document.head.appendChild(style);
}
</script>
<!-- Show the Shopify inbox only on blog page END -->

Hope that this helps.

Regards,
Avada team

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
amoss-merch
New Member
5 0 0

thank you, that worked perfectly