Skip to content

Instantly share code, notes, and snippets.

@wpperform
Created December 31, 2012 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpperform/4420789 to your computer and use it in GitHub Desktop.
Save wpperform/4420789 to your computer and use it in GitHub Desktop.
Genesis category template to display limited post info for
<?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