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 | |
| /** | |
| * @package Kinsta_users | |
| * @version 1.0 | |
| */ | |
| /* | |
| Plugin Name: Kinsta users | |
| Plugin URI: http://wordpress.org/extend/plugins/# | |
| Description: This is an example plugin | |
| Author: Carlo Daniele |
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
| /* | |
| * Custom AJAX spinner on WooCommerce checkout | |
| * The class used to load the overlay is .blockUI .blockOverlay | |
| * The class used to load the spinner is .woocommerce .loader:before | |
| * | |
| */ | |
| .woocommerce .blockUI.blockOverlay:before,.woocommerce .loader:before { | |
| height: 3em; | |
| width: 3em; | |
| position: absolute; |
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 | |
| /** | |
| * Return the permalink of the shop page for the continue shopping redirect filter | |
| * | |
| * @param string $return_to | |
| * @return string | |
| */ | |
| function my_woocommerce_continue_shopping_redirect( $return_to ) { | |
| return get_permalink( wc_get_page_id( 'shop' ) ); | |
| } |
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 Continue Shopping Button on Cart Page | |
| * Add to theme functions.php file or Code Snippets plugin | |
| */ | |
| add_action( 'woocommerce_before_cart_table', 'woo_add_continue_shopping_button_to_cart' ); | |
| function woo_add_continue_shopping_button_to_cart() { |
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
| // Get The Page ID You Need | |
| get_option( 'woocommerce_shop_page_id' ); | |
| get_option( 'woocommerce_cart_page_id' ); | |
| get_option( 'woocommerce_checkout_page_id' ); | |
| get_option( 'woocommerce_pay_page_id' ); | |
| get_option( 'woocommerce_thanks_page_id' ); | |
| get_option( 'woocommerce_myaccount_page_id' ); | |
| get_option( 'woocommerce_edit_address_page_id' ); | |
| get_option( 'woocommerce_view_order_page_id' ); | |
| get_option( 'woocommerce_terms_page_id' ); |
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 | |
| /** | |
| * WooCommerce Bookings Availability Search | |
| * | |
| * This is almost pseudo code, it only serves to explain the "how to do it" and does not attempt to be "The Way" to do it. | |
| * NOTE: This NEEDS to be refined in order to work as expected. | |
| * | |
| * @author António Pinto <apinto@vanguardly.com> | |
| * @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
| * |
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
| //* Remove WooCommerce Add to Cart/Read More button | |
| remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); |
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
| .video-container { | |
| position: relative; | |
| padding-bottom: 56.25%; /*16:9*/ | |
| padding-top: 30px; | |
| height: 0; | |
| overflow: hidden; | |
| } | |
| .video-container iframe, | |
| .video-container object, |
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_filter( 'woocommerce_cart_no_shipping_available_html', 'change_msg_no_available_shipping_methods', 10, 1 ); | |
| add_filter( 'woocommerce_no_shipping_available_html', 'change_msg_no_available_shipping_methods', 10, 1 ); | |
| function change_msg_no_available_shipping_methods( $default_msg ) { | |
| $custom_msg = "Call us for quotation - 1-800-XXX-XXXX"; | |
| if( empty( $custom_msg ) ) { | |
| return $default_msg; | |
| } | |
| return $custom_msg; | |
| } |
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
| $context = Timber::get_context(); | |
| $context['slides'] = Timber::get_posts('post_type=slides'); | |
| $context['pages'] = Timber::get_posts('post_type=page&posts_per_page=2'); | |
| $context['portfolio'] = Timber::get_posts('post_type=portfolio'); | |
| $context['posts'] = Timber::get_posts(); //leave blank for default page query | |
| Timber::render('front-page.twig', $context); |