This file contains 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 TablePress plugin CSS in favor of using LESS from Twitter Bootstrap, see https://gist.github.com/Willem-Siebe/ba6428a1dcd6b767a818. | |
add_filter( 'tablepress_use_default_css', '__return_false' ); |
This file contains 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
// The return to shop button in WooCommerce empty-cart.php goes to the shop archive page. However, if we don't want a shop page and leave this option unset in WooCommerce settings, we need this button to go to our homepage. See https://gist.github.com/Willem-Siebe/c1d70aeef75a3e60ab15. | |
function wsis_woocommerce_return_to_shop_redirect() { | |
return get_home_url(); | |
} | |
add_filter( 'woocommerce_return_to_shop_redirect', 'wsis_woocommerce_return_to_shop_redirect' ); |
This file contains 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 the UL for WooCommerce product loop start and end if your are not using a list, but for example Twitter Bootstrap. See https://gist.github.com/Willem-Siebe/2f2f64012b9cfe36df1a. | |
function woocommerce_product_loop_start() { | |
echo '<div class="wsis-wc-product-loop">'; | |
} | |
function woocommerce_product_loop_end() { | |
echo '</div>'; | |
} |
This file contains 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
// Register LESS stylesheet using the WP LESS plugin, see https://gist.github.com/Willem-Siebe/e7800869c3517d85614c. | |
function wsis_enqueue_styles() { | |
wp_enqueue_style('style-less', get_stylesheet_directory_uri().'/less/style.less'); | |
} | |
add_action('wp_enqueue_scripts', 'wsis_enqueue_styles'); |
This file contains 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 Font Awesome to your LESS stylesheet, see https://gist.github.com/Willem-Siebe/dc6c94aa7dd17c54e9fd. | |
@import "../font-awesome/less/font-awesome.less"; | |
@import "font-awesome/variables.less"; |
This file contains 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
// Variables | |
// -------------------------- | |
// Overwriting @FontAwesomePath using our own variables.less, see https://gist.github.com/Willem-Siebe/e9eeca9db432e1a9ab50. | |
@FontAwesomePath: "../font-awesome/font/"; |
This file contains 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 WooCommerce payment instructions for BACS and COD in your invoice template from WooCommerce PDF Invoices & Packing Slips, see https://gist.github.com/Willem-Siebe/9f371aaaeab1320aaac2. --> | |
<?php do_action( 'woocommerce_thankyou_' . $wpo_wcpdf->export->order->payment_method, $wpo_wcpdf->export->order->id ); ?> |
This file contains 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 the first custom fields available in WooCommerce PDF Invoices & Packing Slips to your own custom invoice template, see https://gist.github.com/Willem-Siebe/cf8474b5ca4e72880a04. --> | |
<?php if ( $wpo_wcpdf->get_extra_1() ): ?> | |
<div id="extra1"> | |
<?php $wpo_wcpdf->extra_1(); ?> | |
</div> | |
<?php endif; ?> | |
<!-- Add the second custom fields available in WooCommerce PDF Invoices & Packing Slips to your own custom invoice template, see https://gist.github.com/Willem-Siebe/cf8474b5ca4e72880a04. --> |
This file contains 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 all Bootstrap 2.3.2 CSS from Toolset Bootstrap theme since I use the original LESS files of Bootstrap in my child theme, remove from version 1.5 the style.css if you don't want to use it, see https://gist.github.com/Willem-Siebe/0f2f2eafc444239d25fe. | |
function wsis_remove_toolset_bootstrap_CSS_files() { | |
wp_dequeue_style('wpbootstrap_bootstrap_responsive_css'); | |
wp_dequeue_style('wpbootstrap_bootstrap_main_css'); | |
wp_dequeue_style('toolset-bootstrap-theme-style'); | |
} | |
add_action('wp_enqueue_scripts','wsis_remove_toolset_bootstrap_CSS_files',999); |
This file contains 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 CSS and JS from WooCommerce Views plugin, because it's conflicting with my Bootstrap LESS or because it's not needed! See https://gist.github.com/Willem-Siebe/681168b39da04ea356de. | |
function wsis_remove_woocommerce_views_assets() { | |
wp_dequeue_style('wcviews-style'); | |
// To make the WooCommerce Tabs work. | |
wp_dequeue_script('woocommerce_views_custom_script'); | |
} | |
add_action('wp_enqueue_scripts','wsis_remove_woocommerce_views_assets',999); |