Created
November 5, 2013 07:02
-
-
Save anonymous/7315011 to your computer and use it in GitHub Desktop.
Thematic, change excerpt length on Category/Archive
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 // ignore this, it is just for the pretty code highlighting | |
// references | |
// http://codex.wordpress.org/Function_Reference/the_excerpt | |
// http://codex.wordpress.org/Conditional_Tags | |
// http://thematictheme.com/forums/topic/number-of-words-on-an-archive-page/ | |
function childtheme_excerpt_length( $length ) { | |
if ( is_category() || is_archive() ) { | |
return 20; | |
} | |
} | |
add_filter( 'excerpt_length', 'childtheme_excerpt_length', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment