// jQuery
$(document).ready(function() {
// code
})
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
| -- based on https://gist.github.com/ruscon%20 https://gist.github.com/mikaelz/d574457cb22f1f79f337 | |
| DELETE relations.*, taxes.*, terms.* | |
| FROM wp_term_relationships AS relations | |
| INNER JOIN wp_term_taxonomy AS taxes | |
| ON relations.term_taxonomy_id=taxes.term_taxonomy_id | |
| INNER JOIN wp_terms AS terms | |
| ON taxes.term_id=terms.term_id | |
| WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product'); | |
| DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product'); |
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 a stylesheet after default style.css | |
| wp_enqueue_style( 'my-css', get_template_directory_uri() . 'my-css.css', array('themename-style')); | |
| //WooCommerce - Sort products by SKU | |
| add_filter('woocommerce_get_catalog_ordering_args', 'custom_woocommerce_catalog_orderby'); | |
| function custom_woocommerce_catalog_orderby( $args ) { | |
| $args['meta_key'] = '_sku'; | |
| $args['orderby'] = 'meta_value'; | |
| $args['order'] = 'asc'; | |
| return $args; |
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_filter( 'woocommerce_checkout_fields' , 'woo_remove_billing_checkout_fields' ); | |
| /** | |
| * Remove unwanted checkout fields | |
| * | |
| * @return $fields array | |
| */ | |
| function woo_remove_billing_checkout_fields( $fields ) { |
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
| # ----------------------------------------------------------------- | |
| # .gitignore for WordPress | |
| # Bare Minimum Git | |
| # http://ironco.de/bare-minimum-git/ | |
| # ver 20150227 | |
| # | |
| # This file is tailored for a WordPress project | |
| # using the default directory structure | |
| # | |
| # This file specifies intentionally untracked files to ignore |