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
<?php | |
/** | |
* The template for displaying product category thumbnails within loops. | |
* | |
* Override this template by copying it to yourtheme/woocommerce/content-product_cat.php | |
* | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 2.4.0 | |
*/ |
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
SELECT weight_info.post_id, weight_info.meta_key, weight_info.meta_value, wp_posts.post_title, quote_info.meta_key, quote_info.meta_value, wp_posts.post_status | |
FROM wordpress_cappels.wp_postmeta as weight_info | |
LEFT JOIN wordpress_cappels.wp_posts ON weight_info.post_id = wp_posts.ID | |
LEFT JOIN wordpress_cappels.wp_postmeta as quote_info ON quote_info.post_id = wp_posts.ID | |
where | |
weight_info.meta_key like '_weight' and | |
quote_info.meta_key like 'quote_product_checkbox' and | |
(weight_info.meta_value like '0' or weight_info.meta_value like '') and | |
(quote_info.meta_value like 'no' or quote_info.meta_value like '') and | |
wp_posts.post_status like 'publish' ; |
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
/*----------------------------------------------- | |
Body - All | |
-----------------------------------------------*/ | |
/*headings*/ | |
@for $i from 1 through 6 { | |
h#{$i}{ | |
font-family: Bitter, Arial, sans-serif; | |
color: rgb(107,57,8); |
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
/** | |
* FUNCTION OVERWRITE - wc_get_template_part (return template part overwritten in this plugin) | |
*/ | |
add_filter('wc_get_template_part', 'myplugin_woocommerce_get_template_part', 10, 3); | |
function myplugin_woocommerce_get_template_part($template, $slug, $name){ | |
$plugin_path = myplugin_plugin_path() . '/woocommerce/'; | |
if(file_exists( $plugin_path . $slug . "-" . $name . ".php")){ | |
$template = $plugin_path . $slug . "-" . $name . ".php"; |
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 normal WooCommerce template loader searches the following locations in order, until a match is found: | |
* 1. your theme / template path / template name | |
* 2. your theme / template name | |
* 3. default path / template name | |
* | |
* The new order of search will be: | |
* 1. your theme / template path / template name | |
* 2. your theme / template name | |
* 3. your plugin / woocommerce / template name |
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
<?php | |
/* | |
Plugin Name: Plugin Name | |
Plugin URI: https://github.com/fuyuko/plugin-repository | |
Description: Plugin description | |
Author: Fuyuko Gratton | |
Version: 0.1 | |
Author URI: http://fuyuko.net/ | |
*/ |
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 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; |