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
remove_action('genesis_loop', 'genesis_do_loop'); | |
add_action('genesis_loop', 'jds_do_loop'); | |
function jds_do_loop() { | |
$args = array( | |
'posts_per_page' => 20, | |
'post_type' => 'page', | |
'post_parent' => 5, | |
'paged' => get_query_var( 'paged' ), | |
'orderby' => 'title', | |
'order' => 'ASC', |
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
// Remove Genesis Archives and Blog Templates | |
function jds_remove_genesis_page_templates( $page_templates ) { | |
unset( $page_templates['page_archive.php'] ); | |
unset( $page_templates['page_blog.php'] ); | |
return $page_templates; | |
} | |
add_filter( 'theme_page_templates', 'jds_remove_genesis_page_templates' ); |
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
// Edit Read More Link | |
add_filter('post-content-shortcodes-read-more', 'jds_more_visit_site'); | |
function jds_more_visit_site($link) { | |
return str_ireplace('Read more', 'Read More...', $link); | |
} |
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
//Custom Image Sizes | |
add_image_size( 'featured-image', 236, 153, TRUE ); |
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
//* Add featured image | |
add_action ( 'genesis_entry_header', 'jds_featured_image', 15); | |
function jds_featured_image() { | |
if ( is_single() ) | |
return; | |
if ($image = genesis_get_image('format=url&size=thumbnail')) { | |
echo '<div class="alignleft">'; | |
printf('<a href="%s"><img class="alignleft" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute('echo=0')); | |
echo '</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
//* Customize the post info function | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12); | |
add_action( 'genesis_entry_header', 'genesis_post_info', 9 ); | |
add_filter( 'genesis_post_info', 'jds_post_info_filter' ); | |
function jds_post_info_filter($post_info) { | |
if (is_home() || is_archive()) { | |
$post_info = '[post_categories before=""] [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
// Enable Shortcode in widgets - Note: This is not recommended. This is plugin functionality. | |
add_filter('widget_text', 'do_shortcode'); |