Skip to content

Instantly share code, notes, and snippets.

View derekshirk's full-sized avatar
🚙
Principal Product Designer at Driveway

Derek Shirk derekshirk

🚙
Principal Product Designer at Driveway
View GitHub Profile
@derekshirk
derekshirk / WordPress-stylesheet-directory
Last active August 29, 2015 14:17
WordPress Get Stylesheet directory
<?php bloginfo('stylesheet_directory'); ?>
@derekshirk
derekshirk / css-overlay-no-blendmode.scss
Created March 9, 2015 19:32
CSS-overlay-no-blendmode
.overlay:before{
position: absolute;
content:"";
top:0;
left:0;
width:100%;
height:100%;
display: none;
z-index:0;
}
@derekshirk
derekshirk / foundation-basic-row-12-columns.php
Created March 9, 2015 19:00
Foundation-basic-row-12-columns
<div class="row">
<div class="large-12 columns">
</div>
</div>
@derekshirk
derekshirk / acf-repeater-fields.php
Created March 7, 2015 02:08
ACF Repeater Fields
<?php
// check if the repeater field has rows of data
if( have_rows('repeater_field_name') ):
// loop through the rows of data
while ( have_rows('repeater_field_name') ) : the_row();
// display a sub field value
the_sub_field('sub_field_name');
@derekshirk
derekshirk / wordpress-query-basic.php
Last active August 29, 2015 14:16
WordPress-custom-query-loop-basic
<?php
$query = new WP_Query();
$query->query(array(
'post_type' => 'service',
'posts_per_page' => -1
));
$post_count = $query->post_count;
$count = 1;
?>
@derekshirk
derekshirk / inline-style-generator.php
Last active August 29, 2015 14:15
Theme Style Approach
<?php
global $post,$wp_query;
get_header();
?>
<!-- Blog Header -->
<div class="blog-header-wrapper">
<?php
$color = oneengine_option('header_blog_color');
$img = oneengine_option('header_blog_img', false, 'url');
$repeat = oneengine_option('header_blog_repeat');
@derekshirk
derekshirk / sass-box-mixin.scss
Last active August 29, 2015 14:13
sass - simple box mixin
$box-style1: 5px, solid, red;
$box-style2: (bStyle: dotted, bColor: blue, bWidth: medium);
@mixin boxy($bWidth, $bStyle, $bColor) {
border-width: $bWidth;
border-style: $bStyle;
border-color: $bColor;
}
.first {
@derekshirk
derekshirk / sass-link-mixin.scss
Last active August 29, 2015 14:13
sass - simple link mixin
@derekshirk
derekshirk / headings.css
Created December 20, 2014 07:44
CSS - perfect fourth styles from type-styles.com
/*----------------------------------------------------------------
Perfect Fourth (http://type-scale.com)
----------------------------------------------------------------*/
h1 {
font-size: 2.369em;
}
h2 {
font-size: 1.777em;
@derekshirk
derekshirk / wp-remove-migrate.js
Last active August 29, 2015 14:03
Wordpress - Remove jquery migrate js
// -----------------------------------------------------------------------------------------
// Remove jquery migrate js
// -----------------------------------------------------------------------------------------
function dequeue_jquery_migrate( &$scripts){
if(!is_admin()){
$scripts->remove( 'jquery');
$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );
}
}