Skip to content

Instantly share code, notes, and snippets.

View stevenrobertsdev's full-sized avatar

Steven Roberts stevenrobertsdev

View GitHub Profile
@stevenrobertsdev
stevenrobertsdev / CustomBreadcrumbs.php
Created January 9, 2018 10:32
Function to create breadcrumbs for custom post types
function my_breadcrumbs() {
/* === OPTIONS === */
$text['home'] = 'Home'; // text for the 'Home' link
$text['category'] = 'Archive by Category "%s"'; // text for a category page
$text['search'] = 'Search Results for "%s" Query'; // text for a search results page
$text['tag'] = 'Posts Tagged "%s"'; // text for a tag page
$text['author'] = 'Articles Posted by %s'; // text for an author page
$text['404'] = 'Error 404'; // text for the 404 page
@stevenrobertsdev
stevenrobertsdev / Foundation-Git-Clone.txt
Created January 3, 2018 15:17
Foundation Git Clone
sudo npm install -g bower
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
npm install
bower install
npm start
@stevenrobertsdev
stevenrobertsdev / excerpt.php
Created December 21, 2017 09:55
ACF Wordpress Custom Excerpt
<?php
function custom_field_excerpt() {
global $post;
$text = get_field('ACF Field Here');
if ( '' != $text ) {
$text = strip_shortcodes( $text );
$text = apply_filters('the_content', $text);
$text = str_replace(']]&gt;', ']]&gt;', $text);
$excerpt_length = 20;
$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
import VueResource from 'vue-resource'
Vue.use(VueResource);
Vue.http.options.root = 'http://localhost:8888/wp-json';
@stevenrobertsdev
stevenrobertsdev / Currier.js
Created December 4, 2017 11:12
Currier Function Transformer
// Created currier transformer
var currier = function(fn) {
var args = Array.prototype.slice.call(arguments,1);
return function() {
return fn.apply(this,args.concat(Array.prototype.slice.call(arguments,0)));
};
};
//----------------------------------
@stevenrobertsdev
stevenrobertsdev / reset.css
Created November 10, 2017 11:36
reset.css
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,