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 // do not include this line if pasting into an existing php file | |
// This function will only return posts that are related AND has ALL of the same categories. | |
function jp_only_rp_in_same_category( $categories, $post_id ) { | |
$category_objects = get_the_category( $post_id ); | |
if ( ! empty( $categories ) ) { | |
$categories = array_merge( 'categories', 'category_objects' ); | |
return $categories; | |
} |
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 | |
/** | |
* Increase the import limit for WooCommerce Product CSV Import Suite | |
*/ | |
add_filter( 'woocommerce_csv_import_limit_per_request', create_function( '', 'return 20;' ) ); //Increase limit to 20 |
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( 'jetpack_mobile_stylesheet', function( $stylesheet, $theme ) { | |
return 'vip/mytheme-mobile'; | |
} ); | |
add_filter( 'jetpack_mobile_template', function ( $template, $theme ) { | |
return 'vip/mytheme-mobile'; | |
// if our mobile theme is a child theme, we should return the parent: | |
// return 'pub/myparenttheme-mobile'; |