Skip to content

Instantly share code, notes, and snippets.

@thinhbg59
thinhbg59 / functions.php
Created July 4, 2017 08:08
Popup form for 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">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium animi autem cumque eum iste
<?php
/*
Template Name: Lookbook
*/
?>
<?php
global $woocommerce;
$no_padding = dh_get_post_meta('no_padding');
/**
* script
<?php
/**
* The Template for displaying product archives, including the main shop page which is a post type archive.
*
* Override this template by copying it to yourtheme/woocommerce/archive-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.0.0
*/
@thinhbg59
thinhbg59 / style2.php
Created November 10, 2016 02:26
ưet
<div class="navbar-wrapper">
<div class="navbar navbar-default" role="navigation">
<div class="noo-container">
<div class="noo-navbar-header">
<?php if( isset($search) && $search == true ): ?>
<a class="noo-search" href="#">
<i class="icon_search"></i>
<?php echo esc_html__('Search','noo-umbra'); ?>
</a>
@thinhbg59
thinhbg59 / index.php
Created November 10, 2016 02:09
tets
<?php
// Silence is golden.
<?php
/*
* If the current post is protected by a password and the visitor has not yet
* entered the password we will return early without loading the comments.
*/
if ( post_password_required() )
return;
$comment_title = esc_html__( 'Comments', 'noo-umbra' );
<?php
$search = noo_umbra_get_option('noo_header_nav_icon_search', true) ;
$wishlist = noo_umbra_get_option('noo_header_nav_icon_wishlist', true) ;
$cart = noo_umbra_get_option('noo_header_nav_icon_cart', true) ;
//---------------------------------------------------------------------
$topbar = noo_umbra_get_option('noo_header_topbar', true) ;
$mail = noo_umbra_get_option('noo_header_topbar_mail', '') ;
$phone = noo_umbra_get_option('noo_header_topbar_phone', '') ;
$top_wishlist = noo_umbra_get_option('noo_header_topbar_wishlist', true) ;
@thinhbg59
thinhbg59 / first-title-letter-query.php
Created November 7, 2016 04:08 — forked from skydriver/first-title-letter-query.php
WordPress List Posts by First Title Letter
<?php
global $wpdb;
$first_char = esc_attr($_GET[$search_key]);
$postids = $wpdb->get_col($wpdb->prepare("
SELECT ID
FROM $wpdb->posts
WHERE SUBSTR($wpdb->posts.post_title,1,1) = %s
AND $wpdb->posts.post_type = 'product'
<?php
/**
* Utilities Functions for NOO Framework.
* This file contains various functions for getting and preparing data.
*
* @package NOO Framework
* @version 1.0.0
* @author Kan Nguyen <[email protected]>
* @copyright Copyright (c) 2014, NooTheme
* @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
<?php
if(!function_exists('noo_shortcode_countdown')){
function noo_shortcode_countdown($attrs){
extract(shortcode_atts(array(
'date' => '',
'title' => '',
'description' => '',
'button_name' => '',