Site logo

Archived topic

Adjusting the excerpt for specific categories

1 reply · Started by robert on March 30, 2022

Viewing posts 1–2 of 2

Hi,
I borrowed this code and changed it so it would only work on two categories.
I am trying to make the excerpt the full content of the article for two categories. unfortunately the code below didnt work...

add_filter( 'excerpt_length','henry_is_cool', 1000 );
function henry_is_cool( $length )
{
if ( is_category('best-lounge', 'best-chair') ) {
return 0;
}
return $length;
}

This archived topic is closed to new replies.