Skip to content

Instantly share code, notes, and snippets.

View JohnBunka's full-sized avatar
🎯
Focusing

John Bunka JohnBunka

🎯
Focusing
View GitHub Profile
<i class="fa fa-camera-retro"></i> fa-camera-retro
@JohnBunka
JohnBunka / functions.php
Last active August 27, 2015 20:58
How to use Font Awesome icons with Genesis in WordPress
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css' );
}
@JohnBunka
JohnBunka / functions.php
Created June 21, 2015 02:25
Genesis: Display a custom Gravatar
//* Display a custom Gravatar
add_filter( 'avatar_defaults', 'sp_gravatar' );
function sp_gravatar ($avatar) {
$custom_avatar = get_stylesheet_directory_uri() . '/images/gravatar.png';
$avatar[$custom_avatar] = "Custom Gravatar";
return $avatar;
}
@JohnBunka
JohnBunka / functions.php
Created June 21, 2015 01:58
GenesisWP: Display a custom Favicon
//* Display a custom favicon
add_filter( 'genesis_pre_load_favicon', 'sp_favicon_filter' );
function sp_favicon_filter( $favicon_url ) {
return 'http://www.pressavenue.com/wp-content/images/favicon.ico';
}
@JohnBunka
JohnBunka / function.php
Created June 20, 2015 19:40
Genesis: Change the footer credits
//* Change the footer text
add_filter('genesis_footer_creds_text', 'sp_footer_creds_filter');
function sp_footer_creds_filter( $creds ) {
$creds = '[footer_copyright] &middot; <a href="http://pressavenue.com">WordPress for Business</a> &middot; [footer_loginout]';
return $creds;
}
@JohnBunka
JohnBunka / style.css
Created May 29, 2015 16:37
Enable Genesis 2.2 Accessibility CSS
/* ## Screen reader text
--------------------------------------------- */
.screen-reader-text,
.screen-reader-text span,
.screen-reader-shortcut {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 1px;
width: 1px;
@JohnBunka
JohnBunka / functions.php
Created May 29, 2015 16:34
Enable Genesis Accessibility
//* Add Accessibility support
add_theme_support( 'genesis-accessibility', array( 'headings', 'drop-down-menu', 'search-form', 'skip-links' ) );
@JohnBunka
JohnBunka / functions.php
Last active August 29, 2015 14:21
Genesis - Display a custom favicon
//* Display a custom favicon
add_filter( 'genesis_pre_load_favicon', 'sp_favicon_filter' );
function sp_favicon_filter( $favicon_url ) {
return 'http://www.mydomain.com/wp-content/images/favicon.ico';
}
@JohnBunka
JohnBunka / style.css
Created May 12, 2015 16:58
CSS used to customize the Simple Social Icons plugin to match the brand colors of each social network.
/* Simple Social Icons
--------------------------------------------- */
.simple-social-icons li.social-dribbble a {
border: 2px solid #ea4c89 !important;
color: #ea4c89 !important;
}
.simple-social-icons li.social-dribbble a:hover {
background-color: #ea4c89 !important;
@JohnBunka
JohnBunka / gist:99a193404fcc3c2db3bd
Created February 23, 2015 20:34
Gravity Wiz // Gravity Forms Unrequire Required Fields for Testing
<?php
/**
* Gravity Wiz // Gravity Forms Unrequire Required Fields for Testing
*
* When bugs pop up on your forms, it can be really annoying to have to fill out all the required fields for every test
* submission. This snippet saves you that hassle by unrequiring all required fields so you don't have to fill them out.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+