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 | |
/** | |
* Plugin Name: WooCommerce Upsells Shortcode | |
* Plugin URI: http://skyver.ge/51 | |
* Description: Adds a shortcode to output WooCommerce product upsells; removes them from the original location when used | |
* Author: SkyVerge | |
* Author URI: https://www.skyverge.com/ | |
* Version: 1.0.0 | |
* | |
* Copyright: (c) 2016 SkyVerge, Inc. ([email protected]) |
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
function init_pmpro_membership_content_filter_later() | |
{ | |
remove_filter('the_content', 'pmpro_membership_content_filter', 5); | |
remove_filter('the_content_rss', 'pmpro_membership_content_filter', 5); | |
remove_filter('comment_text_rss', 'pmpro_membership_content_filter', 5); | |
add_filter('the_content', 'pmpro_membership_content_filter', 15); | |
add_filter('the_content_rss', 'pmpro_membership_content_filter', 15); | |
add_filter('comment_text_rss', 'pmpro_membership_content_filter', 15); | |
} |
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; |
NewerOlder