Skip to content

Instantly share code, notes, and snippets.

View craigsimps's full-sized avatar

Craig Simpson craigsimps

View GitHub Profile
@craigsimps
craigsimps / functions
Last active August 29, 2015 14:18
Remove Genesis site title and description from header.
// Remove Genesis Site Title & Description
remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
@craigsimps
craigsimps / functions.php
Last active May 27, 2017 13:47
Move Genesis primary navigation menu
// Move primary nav menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );
@craigsimps
craigsimps / functions.php
Last active August 29, 2015 14:18
Remove Genesis header right widget area
// Remove the header right widget area
unregister_sidebar( 'header-right' );
@craigsimps
craigsimps / functions.php
Created April 7, 2015 15:15
Genesis remove edit link from posts and pages
// Remove Edit Link
add_filter( 'edit_post_link', '__return_false' );
@craigsimps
craigsimps / functions.php
Created April 7, 2015 16:22
Filter Genesis h1 entry-title
// Filter Post/ Page Title
add_filter( 'genesis_post_title_output', 'filter_post_title_output', 15 );
function filter_post_title_output( $title ) {
if ( is_home() ) {
$title = sprintf( '<h1 class="entry-title"><span>%s</span></h1>', apply_filters( 'genesis_post_title_text', get_the_title() ) );
}
return $title;
@craigsimps
craigsimps / functions.php
Created April 8, 2015 11:20
Reposition Genesis Framework breadcrumbs.
// Move breadcrumbs
remove_action('genesis_before_loop', 'genesis_do_breadcrumbs');
add_action('genesis_before_content', 'genesis_do_breadcrumbs');
@craigsimps
craigsimps / functions
Created April 13, 2015 10:47
Remove edit link from Genesis Framework posts and pages #genesis
// Remove edit link from Genesis posts & pages
add_filter( 'genesis_edit_post_link' , '__return_false' );
@craigsimps
craigsimps / style.css
Created April 13, 2015 14:15
Genesis built in Column Classes #genesis
/* Column Classes
--------------------------------------------- */
.five-sixths,
.four-sixths,
.four-fifths,
.one-fifth,
.one-fourth,
.one-half,
.one-sixth,
@craigsimps
craigsimps / functions.php
Created April 16, 2015 15:55
Modify Genesis Fraemwork Breadcrumb output #genesis
//* Modify breadcrumb arguments.
add_filter( 'genesis_breadcrumb_args', 'sp_breadcrumb_args' );
function sp_breadcrumb_args( $args ) {
$args['home'] = 'Home';
$args['sep'] = ' / ';
$args['list_sep'] = ', '; // Genesis 1.5 and later
$args['prefix'] = '<div class="breadcrumb">';
$args['suffix'] = '</div>';
$args['heirarchial_attachments'] = true; // Genesis 1.5 and later
$args['heirarchial_categories'] = true; // Genesis 1.5 and later
@craigsimps
craigsimps / style.css
Created April 18, 2015 11:49
Add coloured content boxes.
/* Content Boxes
------------------------------------------------------------ */
.content-box-blue,
.content-box-gray,
.content-box-green,
.content-box-purple,
.content-box-red,
.content-box-yellow {
margin: 0 0 25px;