After two years of tinkering my machine is a bit all over. With Mavericks I wanted to start fresh
Make sure everything is up to date.
If you're not familiar with these PHP functions, read this documentation: printf()
/ sprintf()
.
All template code requires validation: if a variable (or array key/value) doesn't exist or doesn't contain data, we don't want to print empty HTML. Writing "pure" PHP with s/printf()
for markup makes validation logic easier to see and shorter to write.
<h1> | |
This is the primary heading and there should only be one of these per page | |
</h1> | |
<p> | |
A small paragraph to <em>emphasis</em> and show <strong>important</strong> bits. | |
</p> | |
<ul> | |
<li>This is a list item | |
</li> | |
<li>So is this - there could be more |
<!-- New HTML5 FB Comments --> | |
<div id="fb-root"></div> | |
<script>(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; | |
fjs.parentNode.insertBefore(js, fjs); |
<?php | |
$ig_post_custom_fields = array ( | |
"infographic" => array( | |
"name" => "is_infographic", | |
"std" => "", | |
"title" => "Is this an infographic post?", | |
"description" => "If you check this box, we'll add a Pin It share option.", | |
"type" => "checkbox"), | |
"image_url" => array( |
* { | |
font-family: San Francisco Display, Texta, Avenir, Lucida Grande, sans-serif !important; | |
} | |
html { | |
background-color: #76fff7; | |
} | |
.container > .sheet { | |
background-color: #205D84 !important; |
<?php | |
$state_array = array( | |
array( | |
'state_name' => 'Alabama', | |
'state_abbr' => 'AL' | |
), | |
array( | |
'state_name' => 'Alaska', | |
'state_abbr' => 'AK' |
// Handles js, sass, image optimisation/compilation and does very basic PHP linting and livereload | |
var gulp = require('gulp'), | |
minifycss = require('gulp-minify-css'), | |
notify = require('gulp-notify'), | |
cache = require('gulp-cache'), | |
sass = require('gulp-sass'), | |
uglify = require('gulp-uglify'), | |
gutil = require('gulp-util'), | |
refresh = require('gulp-livereload'), | |
lr = require('tiny-lr'), |
Using the Social fields in the SEO Plugin, we don't have to enter this data into the theme too:
/**
* Use Yoast SEO Plugin to create these constants
* http://wordpress.org/plugins/wordpress-seo/
* https://gist.github.com/germanny/6222479
*/
User-agent: * | |
# Changing the /feed back to include the trailing slash since it otherwise blocks URLs like http://www.thesimpledollar.com/feeding-my-sweet-tooth-without-breaking-my-belly-or-breaking-the-bank/ | |
Disallow: /feed/ | |
Disallow: /cgi-bin | |
Disallow: /wp-admin | |
Disallow: /wp-content/cache | |
Disallow: /wp-includes | |
Disallow: /trackback | |
Disallow: /xmlrpc.php |