This file contains hidden or 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
/** | |
* Change default thumbnail | |
* @since 1.0 | |
* @author Gabe Lloyd | |
* ref: https://core.trac.wordpress.org/ticket/25449 | |
*/ | |
add_action( 'init', 'custom_fix_thumbnail' ); | |
function custom_fix_thumbnail() { | |
add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src'); |
This file contains hidden or 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 ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly | |
} | |
get_header( 'shop' ); ?> | |
<?php | |
/** | |
* woocommerce_before_main_content hook. | |
* |
This file contains hidden or 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
function caption_responsive(){ | |
//// Make captions responsive | |
// we want to change the width of the figcaptions within figures | |
$('.wp-caption').each(function(){ | |
var caption = $(this), | |
figcaption = caption.find('figcaption').first(), | |
img = caption.find('img[class*="wp-image-"]').first(); | |
if (img.length) { | |
// wait for the image to load or it might have no dimensions |
This file contains hidden or 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
/* | |
* Support Images loading or not | |
* if there are broken images, we hide the broken image icon with a "lazy" class | |
* add img-enhance-ui class to all images in theme. | |
* http://codepen.io/ire/pen/xVxgeo | |
* using "broken-3" styles | |
* | |
* If the images load, we will add class "appear" so they will fade in nicely. | |
* this is not optimized to be hooked into the scrolling behavior, just page load | |
* http://codepen.io/desandro/pen/bIFyl |
This file contains hidden or 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
// ACF Fields, we want to check if the values being returned are arrays | |
// We allow this multiple choice field to be blank in the admin, so the $value can return null, which is not an array. | |
// If we don't check if $value is not there, we get an error with the implode() function | |
$section_top_bottom_padding_array = get_sub_field_object('section_top_bottom_padding'); | |
$value = $section_top_bottom_padding_array['value']; | |
if (is_array($value)) { | |
$section_top_bottom_padding_array_output = implode(" ", $value); | |
} else { // need to declare null if the array is empty | |
$section_top_bottom_padding_array_output = null; |
This file contains hidden or 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
//// HIDE OTHER SHIPPING METHORDS IF FREE IS AVAILABLE | |
/** | |
* Hide shipping rates when free shipping is available. | |
* Updated to support WooCommerce 2.6 Shipping Zones. | |
* | |
* @param array $rates Array of rates found for the package. | |
* @return array | |
*/ | |
function my_hide_shipping_when_free_is_available( $rates ) { | |
$free = array(); |
This file contains hidden or 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
/* | |
* Replace title and type input on the price input field for Name Your Price | |
* Ref: https://gist.github.com/helgatheviking/e1326e2047ed621158f86c1d4747e9bc | |
* | |
* @param string $input - the <input> tag | |
* @param string $product_id | |
* @param string $prefix - needed for composites and bundles | |
* @return string | |
*/ |
This file contains hidden or 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
.flexyflexflex { | |
display: flex; | |
width: 100%; | |
flex-direction: row; | |
flex-wrap: nowrap; | |
flex-shrink: 0; | |
justify-content: flex-start; | |
} | |
.flexyflexflex form { |
This file contains hidden or 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
// save all open docs in Illustrator | |
// originally by carlos canto | |
// http://forums.adobe.com/message/6161400?tstart=0#6161400 | |
for (i=0; i<app.documents.length; i++) | |
{ | |
var idoc = app.documents[i]; | |
//alert("+"+idoc.path+"+"); | |
if (idoc.path == "") |
This file contains hidden or 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="form-group"> | |
<label class="control-label sr-only" for="fonts">Fonts</label> | |
<div class="btn-group dropup"> | |
<label class="control-label" for="fonts">Choose Your Fonts</label> | |
<div id="fontSelect" class="fontSelect"> | |
<div class="arrow-down"></div> | |
</div> | |
</div> |
NewerOlder