Skip to content

Instantly share code, notes, and snippets.

View alisonmf's full-sized avatar
🏠
Working from home

Alison Fulton alisonmf

🏠
Working from home
View GitHub Profile
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div>
<div style="color: rgb(34, 34, 34); line-height: normal; widows: 1;">
@alisonmf
alisonmf / functions.php
Created October 21, 2015 20:31
add fonts in editor styles
//pulls in the fonts from fonts.com
function gob_add_editor_styles() {
$font_url = str_replace( ',', '%2C', '//url.com/style.css' );
add_editor_style( $font_url );
}
add_action( 'after_setup_theme', 'gob_add_editor_styles' );
@alisonmf
alisonmf / post_thumbnail.php
Created January 26, 2015 21:13
the_post_thumbnail or Featured Image in WordPress
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
} else {
echo '<img src="';
@alisonmf
alisonmf / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@alisonmf
alisonmf / rewrites
Created October 16, 2014 15:44
301 rewrite move from sub folder to TLD
RewriteRule ^folder/(.*)$ http://domain.com/$1 [R=301,NC,L]
@alisonmf
alisonmf / sans-pricelabel.php
Created August 6, 2014 22:50
Remove price label from gravity form product field
<?php if ( is_page('slug') ) { // only executes on this page ?>
<script type="text/javascript">
function gform_format_option_label(fullLabel, fieldLabel, priceLabel, selectedPrice, price, formId, fieldId)
{
// Only for field with ID of 5
if (fieldId == 5)
// Disable option pricing. Simply return the field label.
// This removes the price differentials in the drop down
return fieldLabel;
}
@alisonmf
alisonmf / link-interceptor.js
Created June 3, 2014 14:16
intercepts the link to create a "speed bump" popup, letting you know you are leaving the site. requires bPopup
@alisonmf
alisonmf / slider-dynamic.php
Created May 28, 2014 02:20
PHP: simple WordPress slider w/ ACF
<section class="flexslider-sidebar">
<ul class="slides">
<?php $args=array(
'post_type' => 'platinum_logos',
'posts_per_page' => 4,
'orderby' => 'rand'