add_filter( ‘woocommerce_product_tabs’, ‘flwoo_new_product_tab’ ); function flwoo_new_product_tab( $tabs ) { $tabs[‘description’][‘title’] = ‘Thông tin’; $tabs[‘tt_tab’] = array( ‘title’ => __( ‘Hướng dẫn thanh toán’, ‘woocommerce’ ), ‘priority’ => 20, ‘callback’ => ‘thanhtoan_tab_content’ ); $tabs[‘ctdt_tab’] = array( ‘title’ => __( ‘Chính sách điều kiện’, ‘woocommerce’ ), ‘priority’ => 21, ‘callback’ => ‘ctdt_tab_content’ ); return $tabs; } function ..
Category : Wordpress
Code <?php $terms = get_the_terms( get_the_ID(), ‘taxonomy-slug’ ); // taxonomy-slug : chính là taxonomy cần lấy tags foreach ($terms as $key => $value): $termlink=get_term_link($value->slug, ‘taxonomy-slug’ ); ?> <li><a href=”<?=$termlink; ?>”><?=$value->name; ?></a></li> <?php endfore..
WordPress 5 sắp ra mắt vào trong tháng này.Từ wordpress 5 trở lên gutenberg đã tích hợp vào core của wordpress. Itheme cũ akasa sẽ không tương thích với Gutenberg mới hiện tại. Vì để khắc phục website vẫn chạy ổn định trên wordpress 5 sử dụng itheme cũ a e cần phải tắt chức ..
$args = array( ‘numberposts’ => -1, ‘post_type’ => ‘event’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘location’, ‘value’ => ‘Melbourne’, ‘compare’ => ‘LIKE’ ), array( ‘key’ => ‘location’, ‘value’ => ‘Sydney’, ‘compare’ => ‘LI..
1.Form Giỏ hàng [woocommerce_cart] 2. Form thanh toán [woocommerce_checkout] Form tài khoản [woocommerce_my_account] form track order [woocommerce_order_tracking] Sản phẩm nổi bật [featured_products] Sản phẩm khuyến mãi [sale_products] Các Sản Phẩm Bán Chạy Nhất [best_selling_products] Sản phẩm mới [recent_products] sản phẩm liên quan [related_products] Sản phẩm bình chọn tốt nhất [top_rated_products] Sẽ hiển thị các sản ..
Code hiện thị <div class=”col-12 col-sm-12 col-md-12 ajax-content-cat”> <div class=”col-box-items-blogs”> <div class=”row”> <div class=”col-12 col-sm-12 col-md-6″> <div class=”aaaalkll-left”> <?php $wp1 = new WP_Query(array( ‘post_type’=>’post’, ‘post_status’=>’publish’, ‘cat’ => $cat, ‘posts_per_page’=> 1)); while ($wp1->have_posts()) : $wp1->the_post(); ?> <div class=”img-title-category-templates”> <div class=”img-category-templates position-relative”> <a href=”<?php the_permalink();?>”><?php the_post_thumbnail(‘full’);?></a> <span class=”position-absolute”><?php the_category();?></span> </div> <div class=”title-category-templates”> <a href=”<?php the_permalink();?>”><?php the_title();?></a> <div ..
Đây là ví dụ tạo widget hiển thị bài viết ngẫu nhiên class Random_Post extends WP_Widget { function __construct() { parent::__construct( ‘random_post’, ‘Bài ngẫu nhiên’, array( ‘description’ => ‘Widget hiển thị bài viết ngẫu nhiên’ ) ); } function form( $instance ) { $default = array( ‘title’ => ‘Tiêu đề widget’, ‘post_number’ => 10 ); ..
add_filter(‘acf/settings/path’, ‘my_acf_settings_path’); function my_acf_settings_path( $path ) { // update path $path = get_stylesheet_directory() . ‘/acf/’; return $path; } // 2. customize ACF dir add_filter(‘acf/settings/dir’, ‘my_acf_settings_dir’); function my_acf_settings_dir( $dir ) { // update path $dir = get_stylesheet_directory_uri() . ‘/acf/’; // return return $dir; } // 3. Ẩn Acf menu admin add_filter(‘acf/settings/show_admin’, ‘__return_false’); // 4. Include ACF ..
//Giới hạn 100 số từ cắt từ hàm the_excerpt : add_filter(‘excerpt_length’,function($number){ return 100; }); // thay đổi kí tự hiển thị xem tiếp trong hàm the_excerpt add_filter(‘excerpt_more’,function($more){ return ..
WordPress Push Notifications Plugins OneSignal – Free Web Push Notifications Push Notifications for WordPress (Lite) PushEngage Browser SendPulse Free Web Push Roost Web Push Cost Free Free Free Free Free Downloads 20,000+ 1,000+ 1,000+ 1,000+ 900+ Rating 4.6. 3.8 5 5 3.9 Auto Notifications Yes Max 1000 per post per platform Yes Yes Yes Subscriber ..
Phản hồi