Skip to content

Instantly share code, notes, and snippets.

Created November 5, 2013 07:02
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 anonymous/7315011 to your computer and use it in GitHub Desktop.
Save anonymous/7315011 to your computer and use it in GitHub Desktop.
Thematic, change excerpt length on Category/Archive
<?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