Created
December 31, 2012 15:43
-
-
Save wpperform/4420789 to your computer and use it in GitHub Desktop.
Genesis category template to display limited post info for
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_action('genesis_post_content', 'genesis_do_content'); | |
remove_action('genesis_post_content', 'genesis_do_post_content'); | |
remove_action('genesis_before_post_content', 'genesis_post_info'); | |
remove_action('genesis_post_content', 'genesis_do_post_image'); | |
remove_action('genesis_after_post_content', 'genesis_post_meta'); | |
//add_filter( 'pre_option_posts_per_page', 'custom_posts_per_page_filter' ); | |
function custom_posts_per_page_filter( $num ) { | |
return 50; | |
} | |
add_action('genesis_before_loop', 'child_before_loop'); | |
function child_before_loop () { | |
global $query_string; | |
query_posts($query_string . "&posts_per_page=50"); | |
} | |
add_action('genesis_post_content', 'custom_content_limit'); | |
function custom_content_limit() { | |
the_content_limit( 100, __('[Read more...]', 'genesis') ); | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment