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 brandSlider = $('.brand-banner'); | |
brandSlider.owlCarousel({ | |
loop: false, | |
nav: false, | |
dots: false, | |
smartSpeed: 500, | |
margin: 0, | |
responsive: { | |
0: { | |
items: 1 |
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 custom_filter_wpcf7_is_tel( $result, $tel ) { | |
$result = preg_match( '/^(?:0)\d{9}+$/', $tel ); | |
return $result; | |
} | |
add_filter( 'wpcf7_is_tel', 'custom_filter_wpcf7_is_tel', 10, 2 ); | |
?> |
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
jQuery(document).ready(function(){ | |
setTimeout(function(){ | |
//var np_tag = jQuery("template").eq(38).attr("id"); | |
var np_tag = jQuery("template").last().attr("id"); | |
console.log(np_tag); | |
//alert(tag_new); | |
jQuery("#" + np_tag).css("display", "none"); |
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
{% if collection.description != blank %} | |
<div class="collection--description"> | |
{% capture readmore %} | |
<div id="truncated">{{ collection.description | strip_html | truncatewords: 10, "... <a class='read-more-collection' data-no-instant>Read More</a>" }}</div> | |
<div id="fullDescription" style="display: none">{{ collection.description | append: " <a class='read-more-collection' data-no-instant>Read Less</a>" }}</div> | |
{% endcapture %} | |
{{ readmore }} | |
</div> | |
{% endif %} |
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 | |
/* Parse the video uri/url to determine the video type/source and the video id */ | |
function parse_video_uri( $url ) { | |
// Parse the url | |
$parse = parse_url( $url ); | |
// Set blank variables | |
$video_type = ''; | |
$video_id = ''; |
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
<div class="cart-promo"> | |
<h2>ENTER A PROMO CODE</h2> | |
<input type="text" id="devPromo"> | |
<a href="/checkout?discount=none" id="redemDevPromo">Apply Coupon</a> | |
</div> | |
<script> | |
$(document).ready(function(){ | |
//listen to the promo button click | |
$('#redemDevPromo').on('click', function(event){ | |
//disable the button event |
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
/** | |
* @snippet Move product tabs beside the product image - WooCommerce | |
* @how-to Get CustomizeWoo.com FREE | |
* @sourcecode https://businessbloomer.com/?p=393 | |
* @author Rodolfo Melogli | |
* @testedwith WooCommerce 3.5.2 | |
* @donate $9 https://businessbloomer.com/bloomer-armada/ | |
*https://www.businessbloomer.com/woocommerce-move-product-tabs-short-description/ | |
*/ | |
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
/** | |
* Check if product has attributes, dimensions or weight to override the call_user_func() expects parameter 1 to be a valid callback error when changing the additional tab | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
function woo_rename_tabs( $tabs ) { | |
global $product; | |
if( $product->has_attributes() || $product->has_dimensions() || $product->has_weight() ) { // Check if product has attributes, dimensions or weight |
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
/** | |
* Add a custom product data tab | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' ); | |
function woo_new_product_tab( $tabs ) { | |
// Adds the new tab | |
$tabs['test_tab'] = array( | |
'title' => __( 'New Product Tab', 'woocommerce' ), |
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
/** | |
* Customize product data tabs | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_custom_description_tab', 98 ); | |
function woo_custom_description_tab( $tabs ) { | |
$tabs['description']['callback'] = 'woo_custom_description_tab_content'; // Custom description callback | |
return $tabs; | |
} |
NewerOlder