Skip to content

Instantly share code, notes, and snippets.

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

Alison Fulton alisonmf

🏠
Working from home since 2012
View GitHub Profile
@alisonmf
alisonmf / gravity-forms-single-row-form.css
Last active March 18, 2025 16:59
Single row form for email signup - Gravity Forms override
/*
I do not ever want to do this again. So annoying.
This takes two text fields, along with the submit button, and places them in a row or one line for desktop view.
The two text fields need to have custom classes on them. Name and change appropiately.
Ensure your Gravity Form has the correct ID number as well (shown below with ID 7).
This should force your form to display in one line no matter the theme.
<?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