Created
December 31, 2012 15:55
-
-
Save wpperform/4420854 to your computer and use it in GitHub Desktop.
Displays full content for first 2 posts, excerpts for the rest
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_post_content'); | |
add_action('genesis_post_content', 'custom_post_content'); | |
function custom_post_content() { | |
global $loop_counter; | |
if( absint($loop_counter) < 3 ) { | |
the_content(); ?> | |
<?php } | |
else { | |
the_excerpt(); | |
} | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment