This file contains hidden or 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 | |
// Add new featured image size | |
add_image_size( $name, $width, $height, $crop ); | |
?> |
This file contains hidden or 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 | |
/** | |
* Search Shortcode Excerpt | |
* @since 1.1 Genesis 404 Page plugin | |
* @author Bill Erickson | |
*/ | |
function search_shortcode() { | |
return '<div class="genesis-404-search">' . get_search_form( false ) . '</div>'; | |
} |
This file contains hidden or 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 | |
// Remove Pagination from CPT | |
add_action('parse_query', 'cpt_nopaging'); | |
function cpt_nopaging($query) { | |
if (is_post_type_archive('testimonies')) { | |
$query->set('nopaging', 1); | |
} | |
} |
This file contains hidden or 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 | |
/* | |
* Set minimal character limit before comments being accepted | |
* @url: http://www.paulund.co.uk/set-minimal-comment-limit-in-wordpress | |
* / | |
add_filter( 'preprocess_comment', 'minimal_comment_length' ); | |
function minimal_comment_length( $commentdata ) { |
This file contains hidden or 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 | |
// Add support for JetPack infinite scroll | |
function afn_infinite_scroll() { | |
add_theme_support( 'infinite-scroll', array( | |
'container' => 'content', | |
'footer' => 'footer', | |
'render' => 'genesis_do_loop' | |
) ); |
This file contains hidden or 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 | |
// Removee "Protected" and "Private" from Protected and Private Posts | |
function afn_title_trim($title) { | |
$title = attribute_escape($title); | |
$findthese = array( | |
'#Protected: #', // Notice the blank space after Protected: | |
'#Private: #' // Notice again, otherwise the title get pushed. | |
); |
This file contains hidden or 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 | |
// Change submit button text in comment form | |
function afn_change_submit_button_text( $defaults ) { | |
$defaults['label_submit'] = 'Submit Comment'; | |
return $defaults; | |
} | |
add_filter( 'comment_form_defaults', 'afn_change_submit_button_text' ); |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
//* Load Lato and Merriweather Google fonts | |
add_action( 'wp_enqueue_scripts', 'custom_load_google_fonts' ); | |
function custom_load_google_fonts() { | |
wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Lato:300,400|Merriweather:300,400', array(), PARENT_THEME_VERSION ); | |
} |
This file contains hidden or 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
// Responsive image with caption in WordPress | |
.wp-caption { | |
margin-bottom: 1em; | |
margin-left: 0; | |
max-width: 96%; | |
text-align: center; | |
} |
This file contains hidden or 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 | |
/** | |
* TypeKit Fonts | |
* @since Theme 1.0 | |
* @url http://wptheming.com/2013/02/typekit-code-snippet/ | |
* | |
*/ | |
function theme_typekit() { | |
wp_enqueue_script( 'theme_typekit', '//use.typekit.net/xxxxxxx.js'); |