Skip to content

Instantly share code, notes, and snippets.

View mikeyarce's full-sized avatar

Mikey Arce mikeyarce

View GitHub Profile
@mikeyarce
mikeyarce / storefront-custom-footer.php
Created October 11, 2016 18:02
Storefront Custom Footer Credit
<?php
function wc_limit_account_menu_items() {
// Administrator and Shop Manager roles
if ( current_user_can( 'manage_woocommerce' ) ) {
$items = array(
'dashboard' => __( 'Dashboard', 'woocommerce' ),
'orders' => __( 'Orders', 'woocommerce' ),
// 'downloads' => __( 'Downloads', 'woocommerce' ),
'edit-address' => __( 'Addresses', 'woocommerce' ),
<?php
if ( function_exists( 'wc_memberships_is_user_active_member' ) && wc_memberships_is_user_active_member( get_current_user_id(), 'Platinum' ) ) {
//all of the code for the shop archive is here
} else {
//here you would output something other than the shop loop, perhaps instructions on how to join and/or login
}
.storefront-handheld-footer-bar ul li.search .site-search {
bottom: 100%;
}
.storefront-handheld-footer-bar {
top: 0;
}
.storefront-handheld-footer-bar ul li.search.active .site-search {
bottom::-6em;
}
@mikeyarce
mikeyarce / woocommerce-bookings-styles.css
Last active April 9, 2022 13:09 — forked from MindyPostoff/woocommerce-bookings-styles.css
Bookings Datepicker Color Styles
/*
Modify the color styles of the WooCommerce Bookings datepicker calendar.
Add any/all of these styles to your theme's custom CSS, but be sure to change
the color hex codes to your choice. They're all black here.
*/
/* Month header background color */
#wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-header {
background-color: #000000;
}
add_action( 'woocommerce_before_add_to_cart_button', 'marce_add_text', 20 );
function marce_add_text() {
echo '<p>Hello World.</p>';
}
@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 );
@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 / 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 / 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 {}
}