VIEW POST
VIEW POST
Function Code
add_action(‘pre_get_posts’, function ($query) {
if(is_tax(‘product_cat’)) {
// Price Filter
…
VIEW POST
const options = { timeZone: ‘Asia/Tokyo’ };
const date = new Date(); //Khai báo Date sẽ được Convert
const japanTime = date.toLocaleString(
‘ja-JP’,
options
);
VIEW POST
Tips & Tricks
1. Hack IE với CSS
– Hack IE9 Only
:root .class/#id { property:value \0/IE9; }
– Hack…
VIEW POST
Infinite Scroll SliderVersion 2.0
Slider chạy tự động liên tục từ phải qua trái. Hỗ trợ responsive.
History
v2.0
Chuyển handle start/stop ra ngoài.Cho phép itemWidth có thể…
VIEW POST
Search and filter
Dùng để tạo tính năng tìm kiếm và lọc 1 danh sách thích hợp từ 1 mảng JSON
Luồng đi chính
Logic luồng đi…
VIEW POST
Code
$.GFUNC.customEvent = function(){
var listeners = [];
function add_event(event_name,event_handler){
if (listeners){
…
VIEW POST
Check if product is on sale
We can simply check if a product is on sale on by using is_on_sale() function.
<?php
global $product;
if ( $product->is_on_sale() ) {
…
VIEW POST
<?php
$args = array(
‘taxonomy’ => ‘product_category’,
‘orderby’ => ‘ID’,
‘order’ => ‘DESC’
);
$cats = get_categories($args);
foreach($cats as $cat) {
?>