Chèn đoạn script này vào footer của website: WP Admin → Giao diện → Tùy biến (Customize) → Flatsome → Advanced → Global Settings → Custom Scripts → Dán vào ô “Footer Scripts”. Hoặc dùng plugin như Insert Headers and Footers để dán vào Footer. Không cần thay đổi nội dung các liên kết https://zalo.me/…
Lưu trữ danh mục: Thủ thuật
Khi xây dựng một website, việc chọn cấu hình hosting phù hợp là một trong những quyết định quan trọng để đảm bảo trang web hoạt động mượt mà, tải nhanh và ổn định. Bài viết này sẽ giúp bạn hiểu các yếu tố cần thiết và đề xuất cấu hình hosting tối ưu cho…
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: function add_fontawesome_icons() { wp_enqueue_style( ‘font-awesome’, ‘https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘add_fontawesome_icons’ );
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: add_filter( ‘woocommerce_get_availability’, ‘webdy_custom_out_of_stock’, 1, 2 ); function webdy_custom_out_of_stock( $availability, $_product ) { if ( ! $_product->is_in_stock() ) { // Hotline button HTML $hotline = ‘<a…
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: // Ẩn UX Builder và chặn truy cập trực tiếp nếu không phải Admin function webdy_hide_ux_builder_for_non_admins() { if (!current_user_can(‘administrator’)) { …
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…
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’);…
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’, …
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’);…
