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 | |
/** Customize the length of excerpts */ | |
add_filter( 'excerpt_length', 'new_excerpt_length' ); | |
function new_excerpt_length( $length ) { | |
return 30; | |
} |
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 shortcode support to widgets | |
add_filter('widget_text', 'do_shortcode'); |
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 | |
/** Exclude Page in Search */ | |
function exclude_search_pages($query) { | |
if ($query->is_search) { | |
$query->set('post_type', 'post'); | |
} | |
return $query; | |
} |
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 | |
// Reposition comments form in Genesis Framework | |
remove_action( 'genesis_comment_form', 'genesis_do_comment_form' ); | |
add_action( 'genesis_before_comments' , 'genesis_do_comment_form' ) |
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 | |
// 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 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 tags from post meta in Genesis | |
add_filter( 'genesis_post_meta', 'post_meta_filter' ); | |
function post_meta_filter($post_meta) { | |
if ( !is_page() ) { | |
$post_meta = '[post_categories before="Filed Under: "]'; | |
return $post_meta; | |
}} |
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 Zillashare shortcode plugin to post info in Genesis Framework | |
add_filter( 'genesis_post_info', 'post_info_filter' ); | |
function post_info_filter($post_info) { | |
if ( !is_page() ) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit] [zilla_share]'; | |
return $post_info; | |
}} |
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 | |
// Customize post info in Genesis Framework | |
add_filter( 'genesis_post_info', 'post_info_filter' ); | |
function post_info_filter($post_info) { | |
if ( !is_page() ) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]'; | |
return $post_info; | |
}} |
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 Genesis layouts | |
genesis_unregister_layout( 'sidebar-content' ); | |
genesis_unregister_layout( 'content-sidebar-sidebar' ); | |
genesis_unregister_layout( 'sidebar-sidebar-content' ); | |
genesis_unregister_layout( 'sidebar-content-sidebar' ); | |
genesis_unregister_layout( 'content-sidebar' ); | |
genesis_unregister_layout( 'full-width-content' ); |
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 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 ); |
OlderNewer