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
| <?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' ), |
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
| <?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 | |
| } |
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
| .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; | |
| } |
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
| /* | |
| 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; | |
| } |
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
| add_action( 'woocommerce_before_add_to_cart_button', 'marce_add_text', 20 ); | |
| function marce_add_text() { | |
| echo '<p>Hello World.</p>'; | |
| } |
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
| // 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 ); |
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
| // 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' ); |
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
| .site-header-cart .cart-contents:after, | |
| .storefront-handheld-footer-bar ul li.cart > a:before { | |
| content: "\f07a"; | |
| } |
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
| <?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 {} | |
| } |