APIs & Integrations

mkranitz
Contributeur

Removing chat from all pages

Résolue

Hi gang,

 

I have learned how to remove the chat from some pages by using the following code:

 

.page-id-477 #hubspot-messages-iframe-container {display: none !important;}

 

I just create a new line in CSS for each page that I want to prevent the chatbot from showing up in.

 

Question is this: I don't want the chat to show up at all. Is there a single line that I can enter into CSS that will do this? I currently have thirty entries and it's kind of a drag to enter it each time. 

 

I don't want to do it from inside the HubSpot application - I want to control this with CSS as there are other sites using the chat feature.

 

Thanks in advance,

 

Mitch

0 Votes
1 Solution acceptée
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Removing chat from all pages

Résolue

Give this a shot (adding some extra css just to go nuclear on it 😉)

html #hubspot-messages-iframe-container {
    visibility: hidden;
    height: 0 !important;
    width: 0 !important;
    display: none !important;
}

Voir la solution dans l'envoi d'origine

6 Réponses
dennisedson
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Removing chat from all pages

Résolue

Hey @mkranitz 

I would try to remove the .page-id-477 from that css rule and only target the iframe ID. 

0 Votes
mkranitz
Contributeur

Removing chat from all pages

Résolue

Thanks, Dennis! I should have mentioned that I did try to just add this line by itself to the Custom CSS options:

 

#hubspot-messages-iframe-container {display: none !important;}

 

But that didn't work. It sounds like you're suggesting something different, tho? I guess I need to learn what the iframe ID is? 🙂

 

Thanks so much,

 

Mitch

0 Votes
dennisedson
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Removing chat from all pages

Résolue

@mkranitz ,

Would you be able to provide an example page with the chat on it?

0 Votes
mkranitz
Contributeur

Removing chat from all pages

Résolue

You bet - thanks for your help here!

https://www.printpartner.biz/testtest

 

That page has the popup. 

0 Votes
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Removing chat from all pages

Résolue

Give this a shot (adding some extra css just to go nuclear on it 😉)

html #hubspot-messages-iframe-container {
    visibility: hidden;
    height: 0 !important;
    width: 0 !important;
    display: none !important;
}
mkranitz
Contributeur

Removing chat from all pages

Résolue

*BOOM* and there it is... Ladies and gentlemen, let's give it up for Dennis! 👏👏👏

 

Thanks a bunch! I really appreciate your help with this 🙂