Skip to content

Instantly share code, notes, and snippets.

View gspice's full-sized avatar

Ginger Coolidge gspice

  • GSC Solutions LLC
  • Lincoln City, Oregon
View GitHub Profile
@gspice
gspice / altitude-pro-image-shading.css
Created March 20, 2016 15:41
Image shading in altitude pro , get this question on the forum a lot.
.image-section {
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 80%, rgba(0,0,0,0) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(30%,rgba(0,0,0,0)), color-stop(80%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0)));
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 80%,rgba(0,0,0,0) 100%);
background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 80%,rgba(0,0,0,0) 100%);
background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 80%,rgba(0,0,0,0) 100%);
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 80%,rgba(0,0,0,0) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#33000000', endColorstr='#e6000000',GradientType=0 );
display: table;
overflow: hidden;
@gspice
gspice / create-shortcode-containing-html.php
Last active March 20, 2016 19:46
This creates a shortcode containing the HTML representation of a Font Awesome heart icon.
//Creates a shortcode that displays a Font Awesome heart icon
add_shortcode('fa-heart', 'gsc_shortcode_faheart');
function gsc_shortcode_faheart( $attr ){
return '<i class="fa fa-heart"></i>';
}
@gspice
gspice / if-resolution.scss
Created February 9, 2016 20:51 — forked from ffdead/if-resolution.scss
SASS resolution media query mixin
/* @author 14islands.com
* SASS mixins for future proof resolution media query
*/
@mixin if-min-resolution($dppx) {
@include if-resolution(min, $dppx) {
@content;
}
}
@gspice
gspice / telephone-cta-button-menu.css
Created January 21, 2016 20:43
Adding telephone to custom menu in header right widget in genesis theme - this was Executive Pro but in theory it should work in any using this sup.
/* telephone styling */
.genesis-nav-menu li.telephone a {
font-size:24px;
font-weight:500
}
.site-header .genesis-nav-menu a {
padding:16px 20px
}
@gspice
gspice / Contract Killer 3.md
Last active November 17, 2016 17:44
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@gspice
gspice / remove-genesis-theme-settings-content-archive.php
Created July 29, 2015 16:17
Remove the Content Archives section from Genesis > Theme Settings.
add_action( 'genesis_theme_settings_metaboxes', 'themeprefix_remove_genesis_metaboxes' );
function themeprefix_remove_genesis_metaboxes( $_genesis_theme_settings_pagehook ) {
remove_meta_box( 'genesis-theme-settings-posts', $_genesis_theme_settings_pagehook, 'main' );
}
@gspice
gspice / APL-sort-listings-by-price.php
Last active July 17, 2017 18:29
Finally solved! Code to sort AgentPress Listings by price. Thanks to Carrie Dils showing the thread in github for this -- update was suggested by Andrew Norcross that was added to the plugin code. A sortable column was added called listing_price_sortable. This allowed only the numeric value of the price to be stored separately and updated each t…
//change sort order to price high to low
add_action( 'pre_get_posts', 'gsc_listing_price_sort_order' );
function gsc_listing_price_sort_order( $query ) {
if( !is_admin() && is_post_type_archive( 'listing' ) ) {
$query->set( 'meta_key', '_listing_price_sortable' );
$query->set( 'orderby', 'meta_value_num' );
$query->set( 'order', 'desc' ); //list high to low
@gspice
gspice / APL-sort-listings-archive-state.php
Created July 21, 2015 15:21
AgentPress Listings - change sort order to be by state. In CPT, this is 'listing_state'
//change sort order to listing_state in main query
add_action( 'pre_get_posts', 'gsc_listing_state_sort_order' );
function gsc_listing_state_sort_order( $query ) {
if( $query->is_main_query() && !is_admin() && is_post_type_archive( 'listing' ) ) {
$query->set( 'orderby', 'listing_state' );
}
@gspice
gspice / iHomeFinder-wap-search-bar-padding.css
Created July 13, 2015 12:47
Make that zero and make changes in padding on theme on search bar wrap padding
#ihf-main-container .mb-25 {
margin-bottom: 25px;
}
<?php
add_filter( 'pre_get_posts', 'tgm_io_cpt_search' );
/**
* This function modifies the main WordPress query to include an array of
* post types instead of the default 'post' post type.
*
* @param object $query The original query.
* @return object $query The amended query.
*/
function tgm_io_cpt_search( $query ) {