Tawk.to is free and easy to add a live chat widget to your site. However, its branding is too aggressive and some customers may find it disturbing when initiating the chat, but you can remove tawk.to branding in WordPress.
Here’s the screenshot of the branding I’m talking about.
Remove tawk.to branding
Since this chat widget is added via JavaScript, the display none CSS trick won’t work here.
There are a couple of ways to remove it.
1) Recommended:
Purchasing the Remove Branding add-on, which also gives you the option to use your own domains for your chat page. Here’s how to setup Remove Branding and White Label add-on.
2) Using PHP Code Snippet:
Adding a PHP Code Snippet to your site which can be found below:
add_action( 'wp_footer', static function() {
?>
<script>
setInterval( findTawkAndRemove, 100 );
function findTawkAndRemove() {
let parentElement = document.querySelector("iframe[title*=chat]:nth-child(2)");
if ( parentElement ) {
let element = parentElement.contentDocument.querySelector(`a[class*=tawk-branding]`);
if ( element ) {
element.remove();
}
}
}
</script>
<?php
});
The Code Snippet can be added to your theme’s (preferably child theme’s) functions.php file. Alternatively, an easier way is to use the Code Snippets plugin.
Important: While using Code Snippets, please note the legal issues with removing branding this way. I’m not a lawyer and I have no idea about liability.
I hope this helps! If you have any questions, let me know in the comments.
Hi Sanjeev,
It works perfectly for me – but I have a question.
Is it possible to tweak this code to also change the svg icon in the chat bubble that opens the chat?
I’ve tried this as it’s still within the iframe[title*=chat]:
setInterval( findIconAndRemove, 100 );
function findIconAndRemove() {
let parentElement = document.querySelector(“iframe[title*=chat]:nth-child(2)”);
if ( parentElement ) {
let element = parentElement.contentDocument.querySelector(‘svg.tawk-min-chat-icon’);
if ( element ) {
element.remove();
}
}
}
But it doesn’t work. I’m not that experienced with javascript so any help would be amazing!
Thank you
-Aaron
after some time it freeze
unfortunately, it’s a known issue. If I find any other way, I’ll update the code snippet.
Hi, did you find any solution? Thanks for your work
Hi Dav, thanks for getting back. Unfortunately, I haven’t found any easy solution yet.
Excellent, thank you Sanjeev Aryal!
Thanks for reporting and testing. I’ll make a note to look into the codes later. Currently, I don’t have any other ideas.
thank you, for taking the time to reply and look into it. we’ll be in touch
yep as that guy said, it is not working the chat windows freezes after a couple of minutes thanks for the effort though
*side
You can test pruebashabs.company.site here is it it works like a couple of senconds then if you press the top left size of the chat and get out of it and then enter again and then out it freezes
works briefly and then the whole chat freezes
Thanks for reaching out. Is there any live site URL to look into the issue you’re describing?
This method works like charm! Thanks!
Wow. Great. Thanks Aryal