Skip to content

Instantly share code, notes, and snippets.

View cliftonc0613's full-sized avatar

Clifton T Canady cliftonc0613

View GitHub Profile
@cliftonc0613
cliftonc0613 / content-slider.php
Created November 30, 2012 02:00
WordPress Custom Post Type for Foundation Orbit Slider
<?php
$args = array(
'post_type' => 'slide',
'posts_per_page' => 999
);
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query($args);
if($wp_query->have_posts()) : ?>
<div id="featured">
<?php
$args = array(
'post_type' => 'slide',
'posts_per_page' => 999
);
$slide_query = new WP_Query($args);
if($slide_query->have_posts()) : ?>
<div id="featured">
<?php
while($slide_query->have_posts()) : $slide_query->the_post();
/* Sticky Footer Foundation fix */
$(".footer, .push").height($(".footer .row").height()+"px");
$(".wrapper").css({'margin-bottom':(-1*$(".footer .row").height())+"px"});
window.onresize = function(){
$(".footer, .push").height($(".footer .row").height()+"px");
$(".wrapper").css({'margin-bottom':(-1*$(".footer .row").height())+"px"});
}
//Cross browser CSS3 mixins
@mixin box-shadow($left, $top, $radius, $color) {
box-shadow: $left $top $radius $color;
-webkit-box-shadow: $left $top $radius $color;
-moz-box-shadow: $left $top $radius $color;
}
@mixin transition($property, $duration, $easing: linear) {
transition: $property $duration $easing;
@cliftonc0613
cliftonc0613 / gist:dbe42a7bc71500056c07
Last active August 29, 2015 14:20
Poduct on sale
<?php
/*
**
** NOT SURE IS ANY OF THIS IS RIGHT LOL
** Thanks for your help buddy!! :)
*/
add_filter( 'woocommerce_get_price_html', 'buchanan__price_html', 100, 2 );
function buchanan__price_html( $price,$product ){
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation Mega Menu</title>
<link rel="stylesheet" href="css/app.css" />
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" rel="stylesheet">
<script src="bower_components/modernizr/modernizr.js"></script>
</head>
#!/bin/bash
REPO=NAME_HERE
# Dir paths on remote server
# These are associated with branches within a git project
LIVE_BRANCH="master"
LIVE="git@host:/var/www/live/"
STAGE_BRANCH="develop"
STAGE="git@host:/var/www/stage/"

Blur on Scroll + Simple Parallax

This pen demonstrates a simple medium.com-like blur image on scroll and content parallax. It gets the scroll position using requestAnimationFrame instead of an onScroll event.

A Pen by A973C on CodePen.

License.

@cliftonc0613
cliftonc0613 / even_odd_classes.php
Created September 18, 2016 19:34 — forked from gregrickaby/even_odd_classes.php
Even odd classes in WordPress loop
<?php
// WP_Query Arguments
$args = array(
'order' => 'DESC',
'posts_per_page' => 5
);
// The Loop
$query = new WP_Query( $args );
@cliftonc0613
cliftonc0613 / gist:cf885c7142ff2be9218ae16a35414875
Created November 3, 2016 18:13 — forked from bradp/gist:4999343
WordPress function to convert address to Lat/Long
<?php
function brrad_geocode($street_address,$city,$state){
$street_address = str_replace(" ", "+", $street_address); //google doesn't like spaces in urls, but who does?
$city = str_replace(" ", "+", $city);
$state = str_replace(" ", "+", $state);
$url = "http://maps.googleapis.com/maps/api/geocode/json?address=$street_address,+$city,+$state&sensor=false";
$google_api_response = wp_remote_get( $url );