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 | |
//* Remove metaboxes in Genesis settings page | |
function afn_remove_metaboxes( $_genesis_theme_settings_pagehook ) { | |
remove_meta_box( 'genesis-theme-settings-breadcrumb', $_genesis_theme_settings_pagehook, 'main' ); | |
} | |
add_action( 'genesis_theme_settings_metaboxes', 'afn_remove_metaboxes' ); |
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 | |
//* Remove 'You are here' texts in Genesis Framework breadcrumb | |
add_filter( 'genesis_breadcrumb_args', 'afn_breadcrumb_args' ); | |
function afn_breadcrumb_args( $args ) { | |
$args['labels']['prefix'] = ''; | |
return $args; | |
} |
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 | |
/** Customize the length of excerpts */ | |
add_filter( 'excerpt_length', 'new_excerpt_length' ); | |
function new_excerpt_length( $length ) { | |
return 30; | |
} |
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 | |
/** Exclude Page in Search */ | |
function exclude_search_pages($query) { | |
if ($query->is_search) { | |
$query->set('post_type', 'post'); | |
} | |
return $query; | |
} |
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 | |
// Swap image with title and add back the post info in Genesis 2.0 | |
remove_action( 'genesis_entry_content', 'genesis_do_post_image' ); | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
add_action( 'genesis_entry_header', 'genesis_do_post_image' ); | |
add_action( 'genesis_entry_content', 'genesis_do_post_title' ); | |
add_action( 'genesis_entry_content', 'genesis_post_info' ); |
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 | |
// Add new featured image sizes | |
add_image_size( 'grid-thumbnail', 236, 157, TRUE ); | |
add_image_size( 'single-post-thumbnail', 236, 236, TRUE ); | |
add_image_size( 'video-small', 110, 73, TRUE ); |
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 | |
/** | |
* 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 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 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'); |
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 | |
/* | |
* Add a shortcode for search form in WordPress | |
* @url http://www.paulund.co.uk/display-wordpress-search-form | |
*/ | |
function search_form_shortcode( ) { | |
get_search_form( ); | |
} |
NewerOlder