Skip to content

Instantly share code, notes, and snippets.

const countries = {
"Thành phố Hà Nội": {
"Quận Ba Đình": [
"Phường Phúc Xá",
"Phường Trúc Bạch",
"Phường Vĩnh Phúc",
"Phường Cống Vị",
"Phường Liễu Giai",
"Phường Nguyễn Trung Trực",
"Phường Quán Thánh",
@thinhbg59
thinhbg59 / slick-on-mobile.js
Created February 5, 2018 08:55 — forked from ndunk28/slick-on-mobile.js
slick js only on mobile
// slider
$slick_slider = $('.slider');
settings_slider = {
dots: false,
arrows: false
// more settings
}
slick_on_mobile( $slick_slider, settings_slider);
// slick on mobile
<?php
/**
* NOO Meta-Boxes Package
*
* NOO Meta-Boxes Register Function
* This file register add_meta_boxes and save_post actions.
*
* @package NOO Framework
* @subpackage NOO Meta-Boxes
* @version 1.0.0
<?php
if( !function_exists( 'jm_job_template_loader' ) ) :
function jm_job_template_loader( $template ) {
$job_taxes = jm_get_job_taxonomies();
if ( is_post_type_archive( 'noo_job' ) || is_tax( $job_taxes ) ) {
$template = locate_template( 'archive-noo_job.php' );
}
return $template;
}
<div class="footer-phone">
<a href="tel:0981833222">Tư vấn: 0981.833.222</a>
</div>
<style type="text/css">
.footer-phone a{
display: none;
}
@media (max-width: 768px) {
.footer-phone a {
function otff_add_rewrite() {
$url = home_url();
$page_id = 542;
if ( $page_id > 0 ) {
$link = str_replace( $url, '', get_permalink( $page_id ) );
$link = trim( $link, '/' );
add_rewrite_rule( "$link/([^/]+)/page/?([0-9]{1,})/?$", 'index.php?page_id=' . $page_id . '&demo_rw=$matches[1]&paged=$matches[2]', 'top' );
add_rewrite_rule( "$link/([^/]+)/?$", 'index.php?page_id=' . $page_id . '&demo_rw=$matches[1]', 'top' );
SELECT * FROM wp_posts WHERE wp_posts.post_title REGEXP '^[Q].*$' AND wp_posts.post_type = 'store'
<?php
define('HDOM_TYPE_ELEMENT', 1);
define('HDOM_TYPE_COMMENT', 2);
define('HDOM_TYPE_TEXT', 3);
define('HDOM_TYPE_ENDTAG', 4);
define('HDOM_TYPE_ROOT', 5);
define('HDOM_TYPE_UNKNOWN', 6);
define('HDOM_QUOTE_DOUBLE', 0);
define('HDOM_QUOTE_SINGLE', 1);
@thinhbg59
thinhbg59 / demo.php
Last active November 21, 2021 08:06
Add ux builder shortcode - Flatsome Theme
<?php
/*
Plugin Name: OT Flatsome Ultimate Addons
Plugin URI: https://ninewp.com
Description: OT Flatsome Ultimate Addons
Version: 1.0.0
Author: thinhbg59
Text Domain: OT_FL_Ultimate_Addons
Domain Path: /languages
@thinhbg59
thinhbg59 / functions.php
Created July 5, 2017 06:27
popup form woocommerce
function ot_popup_form()
{
if (is_singular('product')):
?>
<div id="dathang" class="lightbox-by-id lightbox-content mfp-hide lightbox-white" style="padding: 20px;">
<div class="row">
<div class="col medium-6">