Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Gardner bgardner

View GitHub Profile
@bgardner
bgardner / sample.html
Last active Nov 24, 2020
Sample HTML used for social media links using Ionicons with the Genesis Framework.
View sample.html
<p class="social">
<a href="http://twitter.com/bgardner"><i class="icon ion-social-twitter"></i></a>
<a href="http://www.facebook.com/bgardner"><i class="icon ion-social-facebook"></i></a>
<a href="http://instagram.com/bgardner"><i class="icon ion-social-instagram-outline"></i></a>
<a href="http://dribbble.com/bgardner"><i class="icon ion-social-dribbble-outline"></i></a>
</p>
@bgardner
bgardner / functions.php
Last active Oct 16, 2020
Remove the edit link on your site using the Genesis Framework.
View functions.php
<?php
//* Do NOT include the opening php tag
//* Remove the edit link
add_filter ( 'genesis_edit_post_link' , '__return_false' );
@bgardner
bgardner / style.css
Last active May 26, 2020
CSS to customize a call-to-action menu button with the Genesis Framework.
View style.css
/* Call-to-action Menu Link
--------------------------------------------- */
.genesis-nav-menu li.highlight a {
background-color: #e5554e;
border-radius: 3px;
color: #fff;
margin-left: 20px;
}
@bgardner
bgardner / functions.php
Last active May 26, 2020
Load Google Fonts with the Genesis Framework.
View functions.php
<?php
//* Do NOT include the opening php tag
//* Load Google Fonts
add_action( 'wp_enqueue_scripts', 'bg_load_google_fonts' );
function bg_load_google_fonts() {
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:400,700|Neuton:400', array(), CHILD_THEME_VERSION );
}
@bgardner
bgardner / style.css
Created Aug 1, 2016
CSS used for Instagram feed.
View style.css
/* Instagram
---------------------------------------------------------------------------------------------------- */
.instagram {
overflow: hidden;
}
.instagram .wrap {
border-top: 1px solid #eee;
margin-left: auto;
@bgardner
bgardner / cta-blue.css
Last active Oct 30, 2019
Create call to action buttons with CSS3.
View cta-blue.css
/*
CTA Button - Blue
------------------------------------------------------------ */
a.cta-button-blue {
background-color: #77c4d5;
box-shadow: 0 4px 0 0 #66abbd;
}
a.cta-button-blue:hover {
@bgardner
bgardner / functions.php
Last active Oct 19, 2019
Load a custom style sheet on your site using the Genesis Framework.
View functions.php
<?php
//* Do NOT include the opening php tag
//* Load custom style sheet
add_action( 'wp_enqueue_scripts', 'custom_load_custom_style_sheet' );
function custom_load_custom_style_sheet() {
wp_enqueue_style( 'custom-stylesheet', CHILD_URL . '/custom.css', array(), PARENT_THEME_VERSION );
}
//* Replace default style sheet
@bgardner
bgardner / functions.php
Last active Aug 21, 2019
Enqueue Google Fonts.
View functions.php
<?php
//* Do NOT include the opening php tag
//* Load Lato and Merriweather Google fonts
add_action( 'wp_enqueue_scripts', 'bg_load_google_fonts' );
function bg_load_google_fonts() {
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,700|Merriweather:300,700', array(), CHILD_THEME_VERSION );
}
@bgardner
bgardner / functions.php
Last active May 3, 2019
Adds support for editor color palette for sites using the Genesis Framework.
View functions.php
<?php
// Do NOT include the opening php tag.
// Adds support for editor color palette.
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Light gray', 'genesis-sample' ),
'slug' => 'light-gray',
'color' => '#f5f5f5',
),
@bgardner
bgardner / functions.php
Last active Apr 9, 2019
Register featured images with the Genesis Framework.
View functions.php
<?php
// Do NOT include the opening php tag.
// Add featured images.
add_image_size( 'front-page-hero', 800, 450, TRUE );
add_image_size( 'front-page-square', 125, 125, TRUE );
add_image_size( 'front-page-thumbnail', 200, 100, TRUE );
You can’t perform that action at this time.