Jump to content

Show Facebook Messenger chat on some pages not all

Recommended Posts

Site URL: https://livingfabulously.com/invite-sleep-fabulously-sound-circle

I installed the FB messenger code-injection in the site footer however when you're on a mobile device where I want someone to subscribe the chat logo is persistently blocking the button or the recaptcha check box.

How can I show the Facebook Messenger chat only on some pages not all?

Thanks everyone!

This is the code-injection I'm using

<!-- Load Facebook SDK for JavaScript -->
      <div id="fb-root"></div>
        window.fbAsyncInit = function() {
            xfbml            : true,
            version          : 'v7.0'

        (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = 'https://connect.facebook.net/en_GB/sdk/xfbml.customerchat.js';
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));</script>

<!-- Your Chat Plugin code -->
      <div class="fb-customerchat"
  logged_in_greeting="So good you're here! If you have any questions, pls let me know 🌸"
  logged_out_greeting="So good you're here! If you have any questions, pls let me know 🌸">

Link to comment

To hide FB chat on One page, add this to Page Settings > Advanced > Header (each page has page header)

  div#fb-root {
    display: none;


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.