1

Is there an easy way to get a specific category page to display excerpts with x amount of words then have a read more link to link to the full post? I've tried the advanced excerpts plugin which does what I want but i want to be able to restrict it to certain categories

0

Try this and place in your functions.php file:

function custom_excerpt_length( $length ) { return 35; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

function excerpt_more( $more ) { return sprintf( '%2$s', get_permalink( get_the_ID() ), __( 'Read More', 'textdomain' ) ); } add_filter( 'excerpt_more', 'excerpt_more' );

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.