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
.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; |
//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>'; | |
} |
/* @author 14islands.com | |
* SASS mixins for future proof resolution media query | |
*/ | |
@mixin if-min-resolution($dppx) { | |
@include if-resolution(min, $dppx) { | |
@content; | |
} | |
} |
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' ); | |
} |
//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 |
//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' ); | |
} |
#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 ) { |