Skip to content

Instantly share code, notes, and snippets.

@cjkoepke
cjkoepke / style.css
Created February 19, 2015 18:08
The default header of a style.css file to designate a theme as a child theme.
/*
Theme Name: A Child Theme
Description: A demo child theme for the Calvin Makes seris: The Beginner's Guide to Building Your Own Website
Author: Calvin Makes
Theme URL: http://www.calvinmakes.com/build-your-first-genesis-child-theme/
Author URI: http://www.calvinmakes.com
Version: 1.0
License: GPL-2.0+
License URI: http://www.opensource.org/licenses/gpl-license.php
@cjkoepke
cjkoepke / style.css
Last active August 29, 2015 14:05
CSS selector for styling author comments in the Genesis Framework.
/*
Style author comments using these Genesis Markup selectors.
Author: Calvin Koepke
Link: http://calvinkoepke.com/style-author-comments-correctly-genesis/
*/
.comment-list .children > .bypostauthor > article {
background: #fff;
border: 0;
border-right: 5px solid #39C9A8;
@cjkoepke
cjkoepke / style.css
Last active August 29, 2015 14:05
Jetpack Sharing CSS
/*
Jetpack Sharing
---------------------------------------------------------------------------------------------------- */
.sd-content ul li a.sd-button {
margin: 0 !important;
width: 25% !important; /* Whatever the number of icons you choose to be using, they should add up in percentages to EQUAL 100% (in this case, I used 4 icons, so 100/4 = 25%). */
border-radius: 0 !important;
text-align: center;
background: #39C9A8 !important; /* Main icon background color. */
@cjkoepke
cjkoepke / functions.php
Created July 22, 2014 19:19
Order Widgets
// Adding a 1 to the end of the action sets the priority of the function.
add_action( 'genesis_before_content_sidebar_wrap', 'ck_home_first_widget', 1 );
function ck_home_first_widget() {
genesis_widget_area( 'home-featured-post', array(
'before' => '<section>',
'after' => '</section>',
) );
}
// Add a 2 to the end to set the priority to second.
@cjkoepke
cjkoepke / functions.php
Created July 12, 2014 20:11
Modify User Profile Widget's Gravatar Size in Genesis Child Theme
<?php
/**
*
* Modify the size of the Gravatar in the User Profile Widget
*
* @author Calvin Koepke
* @since 1.0.0
*/
add_filter( 'genesis_gravatar_sizes', 'ck_user_profile' );
function ck_user_profile( $sizes ) {
@cjkoepke
cjkoepke / functions.php
Last active November 12, 2015 14:15
Custom Post Type Pagination Snippet
<?php
/**
*
* @author Calvin Koepke
* @link http://www.calvinkoepke.com/add-pagination-to-custom-post-types-in-genesis/
*
* Add previous and next buttons to custom post types.
*/
add_action('genesis_before_content', 'ck_custom_navigation_links', 5 )
function ck_custom_navigation_links() {