Skip to content

Instantly share code, notes, and snippets.

View JiveDig's full-sized avatar

Mike Hemberger JiveDig

View GitHub Profile
// Customize the credits
add_filter( 'genesis_footer_creds_text', 'custom_footer_creds_text' );
function custom_footer_creds_text() {
echo '<div class="creds"><p>';
echo 'Copyright &copy; ';
echo date('Y');
echo ' &middot; <a href="/">Business Name</a><br />Website by <a href="http://thestizmedia.com" title="The Stiz Media">The Stiz Media</a>';
echo '</p></div>';
}
.someclass {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.someclass {
-moz-transition: all 0.4s ease-in-out;
-webkit-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
// Sort credits post type archive by credit year
add_action('pre_get_posts','child_alter_credits_archive_query');
function child_alter_credits_archive_query( $query ) {
if( $query->is_main_query() && is_post_type_archive('credits') ) {
$query->set( 'meta_key', 'credit_year' );
$query->set( 'orderby', 'meta_value_num' );
$query->set( 'order', 'DESC' );
}
}
// Reposition the breadcrumbs
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'genesis_after_header', 'genesis_do_breadcrumbs' );
// Change breadcrumb text/args
add_filter( 'genesis_breadcrumb_args', 'child_breadcrumb_args' );
function child_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
// Remove post title
remove_action('genesis_post_title', 'genesis_do_post_title');
// Add content above the sidebar
add_action('genesis_before_sidebar_widget_area', 'jivedig_do_before_sidebar');
function jivedig_do_before_sidebar() {
echo '<div class="widget">';
echo '<div class="widget-wrap">';
echo '<h4 class="widgettitle">The_Title_Here</h4>';
// Put awesomeness here
echo '</div>';
echo '</div>';
}
/* Copy the icon you want from here: http://fortawesome.github.io/Font-Awesome/cheatsheet/ */
.someclass:before {
font-family: FontAwesome;
font-size: 28px;
content: "\f058";
margin-right: 6px;
vertical-align: middle;
}
add_action( 'genesis_entry_header', 'genesis_do_post_format_image', 5 );
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
add_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_entry_content', 'genesis_do_post_image' );
add_action( 'genesis_entry_content', 'genesis_do_post_content' );
add_action( 'genesis_entry_content', 'genesis_do_post_permalink' );
add_action( 'genesis_entry_content', 'genesis_do_post_content_nav' );
add_action( 'genesis_entry_header', 'genesis_post_info' );
add_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );