Last active
December 11, 2015 03:18
-
-
Save wpperform/4536488 to your computer and use it in GitHub Desktop.
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 | |
/* | |
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