Lưu trữ tác giả: admin

Hướng dẫn tích hợp Google Translate vào website

Chép code sau vào HTML2 <a href=”#” onclick=”doGTranslate(‘vi|en’);return false;” title=”English” class=”glink nturl notranslate”><img src=”/wp-content/plugins/gtranslate/flags/24/en.png” height=”24″ width=”24″ alt=”English” /> <span>EN</span></a> <a href=”#” onclick=”doGTranslate(‘vi|vi’);return false;” title=”Vietnamese” class=”glink nturl notranslate”><img src=”/wp-content/plugins/gtranslate/flags/24/vi.png” height=”24″ width=”24″ alt=”Vietnamese” /> <span>VI</span></a> <style>#goog-gt-tt{display:none!important;}.goog-te-banner-frame{display:none!important;}.goog-te-menu-value:hover{text-decoration:none!important;}.goog-text-highlight{background-color:transparent!important;box-shadow:none!important;}body{top:0!important;}#google_translate_element2{display:none!important;}</style> <div id=”google_translate_element2″></div> <script>function googleTranslateElementInit2() {new google.translate.TranslateElement({pageLanguage: ‘vi’,autoDisplay: false}, ‘google_translate_element2’);}if(!window.gt_translate_script){window.gt_translate_script=document.createElement(‘script’);gt_translate_script.src=’https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2′;document.body.appendChild(gt_translate_script);}</script> <script> function GTranslateGetCurrentLang() {var keyValue = document[‘cookie’].match(‘(^|;) ?googtrans=([^;]*)(;|$)’);return…

Hướng dẫn thêm cột “Views” vào danh sách bài viết trong Dashboard

Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau:   // Thêm cột “Views” vào danh sách bài viết trong Dashboard add_filter(‘manage_posts_columns’, ‘posts_column_views’); add_action(‘manage_posts_custom_column’, ‘posts_custom_column_views’, 5, 2); function posts_column_views($defaults){     $defaults[‘post_views’] = __(‘Views’);…

Hướng dẫn thêm khung quảng cáo sau mỗi bài viết

Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau:   // Đăng ký metabox quảng cáo function webdy_ads_metabox() { add_meta_box( ‘webdy_ads_metabox’, ‘Quảng Cáo Dịch Vụ’, ‘webdy_render_ads_metabox’, [‘post’, ‘page’], ‘normal’, ‘default’ ); } add_action(‘add_meta_boxes’, ‘webdy_ads_metabox’);…

Hướng dẫn thêm các liên kết sau mỗi bài viết

  Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau:   /*thêm link sau bài viết*/ // Đăng ký metabox function custom_links_metabox() {     add_meta_box(         ‘custom_links_metabox’,      …

Hướng dẫn thêm nút liên hệ 1

Bạn có thể dán code script bằng các cách sau: Cách 1: Vào Giao diện → Tùy biến → Advanced (Nâng cao) cuộn xuống Custom JS (JavaScript tùy chỉnh) Cách 2: tạo file .js riêng và enqueue nó trong functions.php Cách 3: Dùng UX Blocks (theme Flatsome) hoặc các plugin có mục dán code js…

Hướng dẫn tạo hiệu ứng placeholder động trong ô tìm kiếm

Bạn có thể dán code script bằng các cách sau: Cách 1: Vào Giao diện → Tùy biến → Advanced (Nâng cao) cuộn xuống Custom JS (JavaScript tùy chỉnh) Cách 2: tạo file .js riêng và enqueue nó trong functions.php Cách 3: Dùng UX Blocks (theme Flatsome) hoặc các plugin có mục dán code js…

Hướng dẫn Google nhận diện Tên trang web (Site Name) theo hướng dẫn từ Google

Bạn có thể sử dụng add_filter() trong WordPress để thêm dữ liệu có cấu trúc JSON-LD giúp Google nhận diện Tên trang web (Site Name) theo hướng dẫn từ Google. Dưới đây là một function hoàn chỉnh để thêm dữ liệu JSON-LD vào <head> của trang: 🔹 Code: function add_json_ld_site_name() { // Lấy thông tin…

Hàm hiệu ứng gõ chữ

Cách 1: Vào Giao diện → Tùy biến → Advanced (Nâng cao) cuộn xuống Custom JS (JavaScript tùy chỉnh) Cách 2: tạo file .js riêng và enqueue nó trong functions.php Cách 3: Dùng UX Blocks (theme Flatsome) hoặc các plugin có mục dán code js như Code Snippets ,… Cách 4: Riêng theme Flatsome: wp-admin/admin.php?page=optionsframework…

💬
Trợ lý Webdy
Chatbot được phát triển bởi Webdy.vn