This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Setup the Theme | |
//* =============================================================== */ | |
//* Add the theme setup function below to the genesis_setup hook for better plugin compatability. | |
add_action( 'genesis_setup', 'cm_start_engine', 15 ); | |
//* Define the theme settings and features in a function for use in the genesis_setup hook. | |
function cm_start_engine() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* # Table of Contents | |
- Imports | |
- HTML5 Reset | |
- Baseline Normalize | |
- Box Sizing | |
- Float Clearing | |
- Defaults | |
- Typographical Elements | |
- Headings | |
- Objects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* # Imports | |
---------------------------------------------------------------------------------------------------- */ | |
@import url(//fonts.googleapis.com/css?family=Lato:300,400,700); | |
/* # HTML5 Reset | |
---------------------------------------------------------------------------------------------------- */ | |
/* ## Baseline Normalize | |
--------------------------------------------- */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Modify the placeholder text of the default search form in Genesis. | |
* @author Calvin Makes | |
* @link http://www.calvinmakes.com/modify-placeholder-text-genesis-search-form/ | |
*/ | |
//* Return our new placeholder text (replace CHILD_THEME_TEXT_DOMAIN with your child theme slug). | |
add_filter( 'genesis_search_text', 'cm_search_placeholder' ); | |
function cm_search_placeholder() { | |
return esc_attr__('New Placeholder Text', CHILD_THEME_TEXT_DOMAIN ); |
OlderNewer