Skip to content

Instantly share code, notes, and snippets.

View ifamily's full-sized avatar

Richard Senior ifamily

View GitHub Profile
@ifamily
ifamily / headings-example.htm
Created September 28, 2015 08:55
html headings example
<h1>My Pets</h1>
<p>This page is about my pets.</p>
<h2>Cats</h2>
<p>I have two cats.</p>
<h3>Fluffy</h3>
<p>Fluffy is a black cat. He is not particularly fluffy but is a little flabby.</p>
<h3>Django</h3>
<p>Django is a Bengal cat, a descendent of the Asian Leopard Cat. Django is very beautiful but is a complete lunatic.</p>
<h2>Dogs</h2>
<p>Sadly, I don't have any dogs at the moment, but used to own one.</p>
@ifamily
ifamily / font-awesome-css-example
Created July 10, 2015 12:32
Font Awesome CSS example
/* Prepend a Font Awesome icon before link text or page title in Genesis */
.genesis-nav-menu .menu-item-124 a:before,
.page-id-2 .entry-title:before{
content: "\f0c0";
font-family: FontAwesome;
margin-right: 5px;
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
@ifamily
ifamily / enqueue-font-awesome-wordpress
Last active August 29, 2015 14:24
Enqueue Font Awesome to WordPress
<?php
//* Enqueue Font Awesome
add_action( 'wp_enqueue_scripts', 'ifamily_load_fontawesome' );
function ifamily_load_fontawesome() {
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', array(), '4.3.0' );
}
@ifamily
ifamily / 0_reuse_code.js
Last active August 29, 2015 14:18
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
@ifamily
ifamily / gist:a06b4b1fe7d2a9ddfad6
Created March 29, 2015 20:22
Text meant only for screen readers
/* Text meant only for screen readers. */
.screen-reader-text {
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
}
@ifamily
ifamily / wp-config.php
Last active January 8, 2024 05:06
A universal WordPress wp-config.php which works on local development to staging and production server environments.
<?php
/*
One wp-config for local development to staging to production.
*/
// Define Environments
$environments = array(
@ifamily
ifamily / gist:e3bc3cdb3dad6ca2e9ab
Created May 19, 2014 10:12
WordPress icon using Font Awesome example
<i class="fa fa-wordpress fa-lg"></i> fa-lg
<i class="fa fa-wordpress fa-2x"></i> fa-2x
<i class="fa fa-wordpress fa-3x"></i> fa-3x
<i class="fa fa-wordpress fa-4x"></i> fa-4x
<i class="fa fa-wordpress fa-5x"></i> fa-5x
@ifamily
ifamily / gist:c19080bc67c84b3188bf
Created May 19, 2014 10:04
Basic Font Awesome example
<i class="fa fa-tree"></i>
@ifamily
ifamily / gist:c854c9cf795780505a23
Created May 19, 2014 09:52
Register and load Font Awesome CSS files in WordPress using a CDN
//* Register and load Font Awesome CSS files using a CDN.
add_action( 'wp_enqueue_scripts', 'ifamily_enqueue_awesome' );
function ifamily_enqueue_awesome() {
wp_enqueue_style( 'ifamily-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css', array(), '4.1.0' );
}
@ifamily
ifamily / Clear fix for Genesis Column Classes
Last active April 1, 2018 20:40
This CSS will fix problems caused by Genesis Column Classes of uneven height. Just add a div with the class name of clear-line to your code. Then add this to your .css file.
/*
Clear fix for column classes
---------------------------------------------------------------------------------------------------- */
.clear-line:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;