Skip to content

Instantly share code, notes, and snippets.

View mikeyarce's full-sized avatar

Mikey Arce mikeyarce

View GitHub Profile
@mikeyarce
mikeyarce / stripe-custom.css
Created January 12, 2018 21:14
Style the Stripe 4.X credit card fields
/* Target the Credit Card */
#stripe-card-element {
background: #ffffff !important;
padding: 10px 5px !important;
margin: 5px 0px !important;
}
/* Target the Expiry Date */
#stripe-exp-element {
background: #ffffff !important;
@mikeyarce
mikeyarce / custom-storefront-footer-links.php
Last active November 25, 2017 20:01
Custom footer links for Storefront
@mikeyarce
mikeyarce / boutique-price.css
Created November 22, 2017 21:21
Change price tag display of Boutique theme
span.price {
color: black;
background: none;
position: relative;
box-shadow: none;
}
span.price:after {
display: none;
}
@mikeyarce
mikeyarce / move-product-addon-location.php
Created September 23, 2017 19:58
Move WooCommerce Product Add-on Location
<?php
// This first removes it from `before_add_to_cart_button` and then adds it to `woocommerce_product_thumbnails`
remove_action( 'woocommerce_before_add_to_cart_button', array( $GLOBALS['Product_Addon_Display'], 'display' ), 10 );
add_action( 'woocommerce_product_thumbnails', array($GLOBALS['Product_Addon_Display'], 'display'), 15);
@mikeyarce
mikeyarce / hook-below-sidebar.php
Last active August 22, 2017 22:02
Hook below the sidebar
<?php // Don't add this line if your file already has it!
add_action( 'dynamic_sidebar_after', 'add_to_bottom_of_sidebar', 10, 2);
function add_to_bottom_of_sidebar() {
echo "Hello World!";
}
<?php
add_action( 'storefront_before_content', 'marce_custom_slider_storefront' );
function marce_custom_slider_storefront() {
if ( is_front_page() ) {
echo do_shortcode("[metaslider id=586]");
}
else {}
}
@mikeyarce
mikeyarce / storefront-slider1.php
Created July 19, 2017 20:53
Add Slider to Storefront Content Top
<?php
add_action( 'storefront_content_top', 'marce_custom_slider_storefront' );
function marce_custom_slider_storefront() {
if ( is_front_page() ) {
echo do_shortcode("[metaslider id=586]");
}
else {}
}
@mikeyarce
mikeyarce / storefront-cart.css
Created July 4, 2017 05:58
Change Storefront basket to a cart
.site-header-cart .cart-contents:after,
.storefront-handheld-footer-bar ul li.cart > a:before {
content: "\f07a";
}
@mikeyarce
mikeyarce / remove-woocommerce-smallscreen.php
Created May 19, 2017 15:28
Remove woocommerce-smallscreen.css
// Don't add this opening PHP tag unless your file doesn't already have one
<?php
// Remove woocommerce-smallscreen.css
function marce-remove-woocommerce-smallscreen-css( $enqueue_styles ) {
unset( $enqueue_styles['woocommerce-smallscreen'] ); // Remove the smallscreen optimisation
return $enqueue_styles;
}
add_filter( 'woocommerce_enqueue_styles', 'marce-remove-woocommerce-smallscreen-css' );
@mikeyarce
mikeyarce / woocommerce-smallscreen-filter-breakpoint.php
Last active May 19, 2017 15:25
Change the breakpoint for woocommerce-smallscreen.css
// Don't add this opening PHP tag unless your file doesn't already have one
<?php
// Define a new breakpoint for woocommerce-smallscreen.css
function marce_filter_woocommerce_style_smallscreen_breakpoint( $breakpoint ) {
$breakpoint = '200px';
return $breakpoint;
};
add_filter( 'woocommerce_style_smallscreen_breakpoint', 'marce_filter_woocommerce_style_smallscreen_breakpoint', 10, 1 );