Skip to content

Instantly share code, notes, and snippets.

@wpperform
Last active December 11, 2015 03:18
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/4536488 to your computer and use it in GitHub Desktop.
Save wpperform/4536488 to your computer and use it in GitHub Desktop.
<?php
/*
Category template for Genesis framework to display 5 full posts, no post info or post meta
Author: wpPERFORM.com
To use, put a copy in child theme folder and rename to category-xx.php where xx is replaced by the numeric ID of the category
to which the template applies.
*/
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_after_post_content', 'genesis_post_meta');
add_action('genesis_before_loop', 'child_before_loop');
function child_before_loop () {
global $query_string;
query_posts($query_string . "&posts_per_page=5");
}
add_action('genesis_post_content', 'custom_content_limit');
function custom_content_limit() {
the_content();
}
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment