This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('woocommerce_review_order_before_payment', 'gst_checkout_field'); | |
function gst_checkout_field( $checkout ) { | |
echo '<div id="gst_checkout_field_sec">'; | |
woocommerce_form_field( 'gst_no', array( | |
'type' => 'text', | |
'class' => array('my-field-class orm-row-wide'), | |
'label' => __('GST No'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_previous_post_where() { | |
global $post, $wpdb; | |
return $wpdb->prepare( "WHERE p.menu_order < %s AND p.post_type = %s AND p.post_status = 'publish'", $post->menu_order, $post->post_type); | |
} | |
add_filter( 'get_previous_post_where', 'my_previous_post_where' ); | |
function my_next_post_where() { | |
global $post, $wpdb; | |
return $wpdb->prepare( "WHERE p.menu_order > %s AND p.post_type = %s AND p.post_status = 'publish'", $post->menu_order, $post->post_type); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'product', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'tax_query' => array( | |
'relation' => 'AND', | |
array ( | |
'taxonomy' => 'product_cat', | |
'field' => 'slug', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'product', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'tax_query' => array( | |
'relation' => 'AND', | |
array ( | |
'taxonomy' => 'product_cat', | |
'field' => 'slug', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'product', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
/*'meta_key' => 'ingredients', | |
'meta_value' => ' ', | |
'meta_compare' => '!='*/ | |
'meta_query' => array( | |
'relation' => 'AND', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>faq</title> | |
<style> | |
/*FAQS*/ | |
.faq_question { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function break_content($text,$length){ | |
$text = trim($text); | |
if(strlen($text)<$length+10) | |
return $text;//don't cut if too short | |
$break_pos = strpos($text, ' ', $length);//find next space after desired length | |
$visible = substr($text, 0, $break_pos); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Show post category wise shortcode [show_post_category_wise] | |
add_shortcode('show_post_category_wise','show_post_category_wise_shortcode'); | |
function show_post_category_wise_shortcode(){ | |
$terms = get_terms('category'); | |
$html = ''; | |
if($terms) { | |
foreach($terms as $term){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Show post category wise shortcode [show_post_category_wise] | |
add_shortcode('show_post_category_wise','show_post_category_wise_shortcode'); | |
function show_post_category_wise_shortcode(){ | |
$terms = get_terms('technology'); | |
$html = ''; | |
if($terms) { | |
foreach($terms as $term){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var countries = { | |
"297" : { | |
"countryName": "Aruba", | |
"code": "AW", | |
"phoneCode": "297" | |
}, | |
"93" : { | |
"countryName": "Afghanistan", | |
"code": "AF", | |
"phoneCode": "93" |