Skip to content

Instantly share code, notes, and snippets.

View richstrauss's full-sized avatar

Rich Strauss richstrauss

View GitHub Profile
@ocean90
ocean90 / box-shadow.html
Last active September 3, 2024 16:56
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
@boogah
boogah / .htaccess
Created February 16, 2012 04:59
Expire headers .htaccess code.
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
add_action('genesis_meta', 'remove_subnav_specific_pages');
function remove_subnav_specific_pages() {
if ( !is_page('11446') )
remove_action('genesis_after_header', 'genesis_do_subnav');
}
add_action('genesis_meta', 'remove_category_menu_exclude_archives_posts');
function remove_category_menu_exclude_archives_posts() {
if ( !is_archive() && !is_single() && !is_page('blog') )
remove_action('genesis_after_header', 'genesis_do_subnav');
}
@cobaltapps
cobaltapps / DWB Responsive Logo Image Trick
Last active August 28, 2019 01:10
This CSS code is for a DWB screencast where I show how to make your Logo Image responsive, without the need for multiple images.
/* 5th @media query trigger point */
.site-header {
min-height: 80px;
}
.header-image .site-header .wrap .title-area {
width: 320px;
height: 80px;
background-size: 320px 80px;
}
@frankyonnetti
frankyonnetti / CSS--hex-opacity-values.css
Last active August 1, 2024 16:33
#css Hex Opacity Values
/*
* Hex Opacity Values
*/
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
@AlphaBlossom
AlphaBlossom / remove-woocommerce-admin-theme-support-warning.php
Last active February 7, 2022 15:35
Integrate WooCommerce into Genesis Child Theme
// Remove WooCommerce Theme Support admin message
add_theme_support( 'woocommerce' );
@neilgee
neilgee / agencypro.php
Last active January 26, 2017 23:44
Agency Pro - Multiple background Images
<?php
//* Enqueue Backstretch script and prepare images for loading
add_action( 'wp_enqueue_scripts', 'agency_enqueue_backstretch_scripts' );
function agency_enqueue_backstretch_scripts() {
// $image = get_option( 'agency-backstretch-image', sprintf( '%s/images/bg.jpg', get_stylesheet_directory_uri() ) );
//* Load scripts only if custom backstretch image is being used
//if ( ! empty( $image ) ) {
@hirejordansmith
hirejordansmith / enable-gf-field-label-visibility-settings.php
Created February 10, 2016 11:24
Enable GF field label visibility settings
<?php
add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' );
?>
@mikejolley
mikejolley / functions.php
Created March 10, 2016 09:39
WooCommerce Disable guest checkout for certain products
<?php
// Code goes in theme functions.php or a custom plugin
add_filter( 'pre_option_woocommerce_enable_guest_checkout', 'conditional_guest_checkout_based_on_product' );
function conditional_guest_checkout_based_on_product( $value ) {
$restrict_ids = array( 1, 2, 3 ); // Replace with product ids which cannot use guest checkout
if ( WC()->cart ) {
$cart = WC()->cart->get_cart();