Skip to content

Instantly share code, notes, and snippets.

View nicholasdixon's full-sized avatar

nicholasdixon

View GitHub Profile
var gulp = require('gulp'),
gutil = require('gulp-util'),
coffee = require('gulp-coffee'),
browserify = require('gulp-browserify'),
compass = require('gulp-compass'),
connect = require('gulp-connect'),
gulpif = require('gulp-if'),
uglify = require('gulp-uglify'),
minifyHTML = require('gulp-minify-html'),
concat = require('gulp-concat');
{
"name": "example",
"version": "0.0.1",
"description": "Example Workflow",
"author": "Nicholas Dixon",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-browserify": "^0.5.1",
"gulp-coffee": "^2.3.3",
"gulp-compass": "^2.1.0",
@nicholasdixon
nicholasdixon / index.php
Created May 22, 2016 09:18
one-page website
<?php session_start() ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web Design North Yorkshire</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700|Roboto+Slab' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/style.css">
@nicholasdixon
nicholasdixon / content-portfolio.php
Created January 16, 2016 17:45
Working Excerpt with Custom Posts
<?php
// Set varable for getting the excert of the custom post
$my_excerpt = get_the_excerpt();
// Sets the number of posts to display, if it is the front page (home), then 4 posts show, if not then all posts show.
$num_posts = ( is_front_page() ) ? 4 : -1;
$args = array(
'post_type' => 'portfolio',
'posts_per_page' => $num_posts
@nicholasdixon
nicholasdixon / functions.php
Last active January 16, 2016 17:39
Genesis Custom Posts - Excerpt not working
<?php
add_theme_support( 'post-thumbnails' );
// Controls the length of the Posts and Custom Posts
function wpt_excerpt_length( $length ) {
return 26;
}