Skip to content

Instantly share code, notes, and snippets.

View girlie's full-sized avatar

Shelley Denise girlie

  • GirlieWorks, LLC
View GitHub Profile
function wp_rocket_deactivate_inline_css_minify( $html_options ) {
unset( $html_options['cssMinifier'] );
return $html_options;
}
function wp_rocket_activate_inline_js_minify( $html_options ) {
$html_options['jsMinifier'] = 'rocket_minify_inline_js';
return $html_options;
}
add_filter( 'rocket_minify_html_options', 'wp_rocket_activate_inline_js_minify' );
anonymous
anonymous / gist:7c1592d763baeb89035e02f7bf1fa41a
Created September 5, 2017 00:01
fix wprocket-slash.php
<?php
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
/*
Plugin Name: Enforce Trailing Slash on URLs
Author: Jonathan (WP Rocket Team)
Author URI: http://wp-rocket.me
*/
add_filter( 'before_rocket_htaccess_rules', '__force_trailing_slash' );
function __force_trailing_slash( $marker ) {
@cobbman
cobbman / functions.php
Last active May 30, 2018 18:14
WooCommerce - Show min - max prices for variations, rather than the min price only
/**
* This code should be added to functions.php of your theme
**/
//This changes the "From:" price on the products page to a Rent-Buy value instead.
// ***** It ALSO checks to see if the product is on sale, and displays the sale price instead of the top variable price
add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2);
function custom_variation_price( $price, $product ) {
$price = '';
add_filter( 'rocket_cache_reject_ua', 'wprocket_remove_fb_ua' );
function wprocket_remove_fb_ua( $ua ) {
if ( in_array( 'facebookexternalhit', $ua ) ) {
$ua = array_flip( $ua );
unset( $ua[ 'facebookexternalhit' ] );
$ua = array_flip( $ua );
}
return $ua;
}
@lanecwheeler
lanecwheeler / slack-css
Last active January 23, 2019 17:52
Custom css to edit colors on Slack desktop client
/*
Copyright 2017 Bryan Keller (https://github.com/widget-)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@wpsmith
wpsmith / category.php
Last active February 24, 2019 17:13 — forked from billerickson/template-gallery.php
Custom Genesis Category Template with Pagination
<?php
/**
* Custom Category Template
*
* @package my_child_theme
* @since 1.0.0
* @author Travis Smith <t@wpsmith.net>
* @copyright Copyright (c) 2013, Travis Smith
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @link https://gist.github.com/wpsmith/5062834
@ozzyrod
ozzyrod / responsive-menu-css.css
Last active April 23, 2019 05:54
Creates a mobile responsive menu in a Genesis child theme with support for collapsible sub menus.
/* Responsive Navigation
---------------------------------------------------------------------------------------------------- */
/* Standard Navigation
--------------------------------------------- */
nav {
clear: both;
}
@blcarson
blcarson / slack-4-lato.css
Created July 23, 2019 00:33
Fork of @caiceA's dark Slack v4 theme with default fonts and minor CSS fixes
@import url('https://fonts.googleapis.com/css?family=Lato:400,700,900&display=swap');
body {
font-family: 'Lato', sans-serif !important;
text-rendering: optimizeLegibility !important;
word-spacing: -1px;
-webkit-font-smoothing: auto;
}
.CodeMirror-cursor {
border-left-color: rgba(255,255,255,1) !important;
}
@jacksonfdam
jacksonfdam / gist:3000405
Created June 27, 2012 00:15
Master Stylesheet
/*
URL: http://www.crucialwebhost.com/blog/master-stylesheet-the-most-useful-css-technique/
One of the most common mistakes I see beginners and intermediates fall victim to when it comes to CSS is not removing the default browser styling. This leads to inconsistencies in the appearance of your design across browsers, and ultimately leaves a lot of designers blaming the browser. It is a misplaced blame, of course. Before you do anything else when coding a website, you should reset the styling.
*/
/***** Global Settings *****/
html, body {