Conditional Tag In Excerpt Length Filter?
-
Maybe I’m not getting something basic about how filters work. Why does the following not work correctly? It -always- returns 55.
add_filter('excerpt_length', 'new_excerpt_length'); function new_excerpt_length($length) { if( is_front_page() ) return 55; else return 100; } add_filter('excerpt_length', 'new_excerpt_length');
TIA,
–JC
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Conditional Tag In Excerpt Length Filter?’ is closed to new replies.