Every SITETOT.COM button is a self-contained component: a single JavaScript file with no jQuery and no other library. Installing one takes two things: load the file, then put the tag where you want the button.
Step 1: upload the button file
Unzip the package you bought and copy nut-sao-chep-link.js to a folder on your site, for example /nut/.
Step 2: paste one script line and one tag
<script defer src="/nut/nut-sao-chep-link.js"></script>
<nut-sao-chep-link mau="#e8590c"></nut-sao-chep-link>The <script> line is needed once per page and can go anywhere. The <nut-…> tag goes exactly where the button should appear, as many times as you like.
On WordPress
- Paste the
<script>line into your theme's footer code area (many themes have a "Footer scripts" box, or use a code-snippet plugin). - Paste the
<nut-…>tag into a Custom HTML block in a post, page or widget.
Change color and text
All buttons accept the shared attributes: mau (brand color), mau-chu (text color), nhan (button text), kieu="icon" (44px round icon only), kieu="vien" (outline) and rong (full width). Each button's own attributes are listed on its page.
Button language
Button text and messages follow the page language. On a page with <html lang="en"> they appear in English; on a Vietnamese page, in Vietnamese.
Turn a button off site-wide
Put one line before the button script:
<script>window.KHO_NUT_TAT = ['chat-zalo'];</script>Every <nut-chat-zalo> tag on the site hides itself. Remove the name from the list to bring it back, with no page-by-page edits.