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
/* Convert the standard WooCommerce products list into a modern responsive grid. */ | |
ul.products { | |
--grid-gap: 32px; | |
--auto-grid-min-size: 200px; | |
grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size), 1fr)); | |
grid-gap: var(--grid-gap); | |
display: grid; | |
} | |
ul.products:before{ | |
content:unset!important; |
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
/** | |
* This code snippet removes JavaScript and CSS files loaded from WooCommerce if they are not necessary. | |
* | |
* Please test this on a staging copy of your website before putting this into the functions.php of your live website. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'my_remove_woo_assets', 99 ); | |
function my_remove_woo_assets() { | |
if ( function_exists( 'is_woocommerce' ) ) { // Check if Woo is installed. | |
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { // Only run on non-Woo pages. | |
// Remove unnecessary stylesheets. |
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
/** | |
* to exclude field from notification add 'exclude[ID]' option to {all_fields} tag | |
* 'include[ID]' option includes HTML field / Section Break field description / Signature image in notification | |
* see http://www.gravityhelp.com/documentation/page/Merge_Tags for a list of standard options | |
* example: {all_fields:exclude[2,3]} | |
* example: {all_fields:include[6]} | |
* example: {all_fields:include[6],exclude[2,3]} | |
*/ | |
add_filter( 'gform_merge_tag_filter', 'all_fields_extra_options', 11, 5 ); | |
function all_fields_extra_options( $value, $merge_tag, $options, $field, $raw_value ) { |
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 | |
defined( 'ABSPATH' ) OR exit; | |
/** | |
* Plugin Name: (WCM) PHPMailer Exceptions & SMTP | |
* Description: WordPress by default returns <code>FALSE</code> instead of an <code>Exception</code>. This plugin fixes that. | |
*/ | |
add_action( 'phpmailer_init', 'WCMphpmailerException' ); | |
function WCMphpmailerException( $phpmailer ) | |
{ |
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 | |
add_filter( 'wp_stream_record_array', 'bhww_filter_wp_stream_record_array', 10, 1 ); | |
function bhww_filter_wp_stream_record_array( $recordarr ) { | |
if ( ! isset( $recordarr[0] ) ) | |
return array(); | |
// BackupBuddy (iThemes) entries | |
if ( 'settings' === $recordarr[0]['connector'] && isset( $recordarr[0]['stream_meta']['option'] ) && 'ithemes-updater-cache' === $recordarr[0]['stream_meta']['option'] |
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 | |
//* Do NOT include the opening php tag | |
//* Add multiple grid loops to a page template*/ | |
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop | |
function custom_do_grid_loop() { | |
$args = array( |
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 | |
// Prevent unwanted results from appearing in (future) Stream records - v 1.x | |
add_filter( 'wp_stream_record_array', 'bhww_core_wp_stream_filter_record_array', 10, 1 ); | |
function bhww_core_wp_stream_filter_record_array( $recordarr ) { | |
// BackupBuddy (iThemes) entries | |
$context = 'settings'; | |
$option = 'ithemes-updater-cache'; | |
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 | |
add_action( 'tgmsp_before_slider_output', 'tgm_custom_slider_theme' ); | |
function tgm_custom_slider_of_madness( $id ) { | |
// If not the proper slider ID, do nothing. Change to match your slider ID. | |
if ( '324' !== $id ) return; | |
// Dequeue the default styles. | |
wp_dequeue_style( 'soliloquy-style' ); | |