• Bỏ qua primary navigation
  • Skip to main content
  • Bỏ qua primary sidebar

Thủ thuật thiết kế website

Chia sẻ kinh nghiệm thiết kế website

  • Trang chủ
  • Joomla
    • Thủ thuật Joomla
    • Joomla Extensions
    • Joomla Themes
  • WordPress
    • Thủ thuật WordPress
    • WordPress Plugins
    • WordPress Themes
  • PHP Framework
    • Codeigniter
    • Laravel
    • Laminas
  • App Developer
    • React Native
    • Flutter
  • SEO
  • Chia sẻ
  • Phần mềm
Bạn đang ở:Trang chủ / Wordpress / Thủ thuật WordPress / Tạo nút nhắn tin Sms, Zalo, Facebook trên website Wordpress

Tạo nút nhắn tin Sms, Zalo, Facebook trên website WordPress

29/07/2020 - Administrator Để lại bình luận

Chèn bộ code vào web

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">

Code HTML:

Nhiều cách bỏ nhưng mình sẽ giới thiệu cách dễ nhất là copy code dưới bỏ vào cuối file function.php (vào giao diện > sửa giao diện > file function.php)

add_action('wp_footer','tn_chat');

function tn_chat(){?>
  <ul id="tnContact">
    <li>
      <a href="https://messenger.com/t/temnerhome" class="iconfb" target="_blank">
        <i class="fab fa-facebook-f"></i>
      </a>
      <span class="label fb" >Chat Facebook</span>
    </li>
    <li>
      <a href="https://zalo.me/0907701772" class="iconzalo" target="_blanl">
        <img src="https://webvina.net/wp-content/uploads/2021/07/icon_zalomessage.png" alt="">
      </a>
      <span class="label zalo">Nhắn tin zalo</span>
    </li>
    <li>
      <a href="sms:0907701772" class="iconsms">
        <i class="fas fa-sms"></i>
      </a>
      <span class="label sms">Nhắn tin điện thoại</span>
    </li>
    <li>
      <a href="tel:0907701772" class="iconcall">
        <i class="fas fa-phone"></i>
      </a>
      <span class="label call">Gọi điện thoại</span>
    </li>
  </ul><?php
}

Thay thế SĐT và ID Fanpage của bạn lại hen. Để tránh mất hình về sau thì bạn tải icon zalo tại link dưới và thay thế đường dẫn trong thẻ <img src=”link ảnh thay thế vào đây”/> , tại code trên lại nha.

https://webvina.net/wp-content/uploads/2021/07/icon_zalomessage.png

Tiếp theo là

Code CSS:

#tnContact{
  max-width: 230px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 3%;
  left: 2%;
  z-index: 9999;
}
#tnContact li{
  list-style-type: none;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-bottom: 10px;
  white-space: nowrap;
}
#tnContact li a{
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  margin-right: 15px;
  text-align: center;
  border-radius: 99px;
}
#tnContact li a i{
  font-size: 18px;
  color: #fff;
}
#tnContact li .iconzalo img{
  width: 24px;
  height: 24px;
  vertical-align: middle;
}
#tnContact li .label{
  position: relative;
  visibility: hidden;
  cursor: pointer;
  color: #fff;
  padding: 6px 10px;
  border-radius: 0 99px 99px 0;
}
#tnContact li .label:before{
  content: "";
  top: 0;
  left: -15px;
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-right: 15px solid #189eff;
  border-bottom: 15px solid transparent;
}
#tnContact li:hover .label{visibility: visible;}

/* Background Icon & Label */
.iconfb , .label.fb{background: #3b5999}
.iconzalo , .label.zalo{background: #008df2}
.iconsms , .label.sms{background: #00c300;}
.iconcall , .label.call{background: #383838}

.fb.label:before{  border-right-color: #3b5999!important}
.zalo.label:before{  border-right-color: #008df2!important}
.sms.label:before{  border-right-color: #00c300!important}
.call.label:before{  border-right-color: #383838!important}

Nguồn : Sưu tập

5 1 đánh giá
Article Rating
Theo dõi
Đăng nhập
Thông báo của
guest
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả bình luận

Sidebar chính

LỜI NGỎ

Đây là blog cá nhân, cung cấp các thông tin, kiến thức và kinh nghiệm về lập trình và cuộc sống. Những bài viết được mình sưu tập từ nhiều nguồn, mọi chi tiết liên quan đến bản quyền xin vui lòng liên hệ qua email kairu2607@gmail.com ! Cám ơn rất nhiều.

Tìm kiếm

Thủ thuật Wordpress

Hướng Dẫn Cấu Hình SMTP Để Gửi Mail Trên WordPress

Cách tự tạo thêm Sidebar cho theme wordpress

Vì Sao Rank Math Vượt Trội – SEO WordPress 2023

Thêm lượt xem bài viết vào WordPress Post Views Counter

Website Bị Hack Virus Index Tiếng Nhật và Toàn Tập Các Cách Xử Lý

Hướng dẫn tạo liên hệ All in one phiên bản có yêu cầu gọi lại

Tạo gợn sóng phân cách bằng SVG trên Flatsome

Codeigniter Framework

[CodeIgniter 4] Codeigniter 4 Remove Public and Index.php From URL

[CodeIgniter 4] How to upload Codeigniter 4 website on share hosting?

Sửa lỗi website Codeigniter 2.x không chạy được với PHP 7.x

[CodeIgniter 4] Sử dụng cURL trong CodeIgniter 4

[CodeIgniter 4] Sử dụng cache để tăng tốc website trong CodeIgniter 4

[CodeIgniter 4] Xử lý hình ảnh chuyên nghiệp trong CodeIgniter 4

[CodeIgniter 4] Hướng dẫn gửi mail trong CodeIgniter 4

Dịch vụ Thiết Kế Website

Laravel

How To Create A Todo List Application In React Native With Laravel Backend

Laravel Cũng Có Notifications?

Cách Bảo Mật Đơn Giản Trong Laravel Bằng Ẩn Config Quan Trọng

Tạo Desktop Notification đơn giản và dể hiểu

Vime thư viện HTML5 Player vừa đẹp mà vừa ngon

Laravel domPDF cách tùy biến Font chữ bất chấp mọi thể loại

Phần mềm hay

Byebye Edge Chromium/Microsoft Edge

Hướng dẫn tắt Gatekeeper (Bật tùy chọn Anywhere) sửa lỗi “damaged and can’t be opened. You should move it to the Trash”

Cài lại macOS trên Mac Silicon (M1) “sạch trơn” bằng macOS Recovery

Cách vào Recovery [Startup Options] trên Mac dùng chip Apple Silicon [M1]

Hướng dẫn tắt System Integrity Protection (SIP) để chạy App Cr4ck

Copyright © 2023 · Metro Pro on Genesis Framework · WordPress · Đăng nhập

wpDiscuz