I recently installed the simple yet effective Coraline theme on one of my WordPress-powered blogs. I’ve been able to customize the theme to my liking, and the contents are way more important than the design so I went for this simple theme.
There was however one thing that kept bugging me: category and tag pages weren’t showing post excerpts but rather full posts. Being somewhat knowledgeable about SEO, I figure it might lead to unnecessary duplicate content issues and I wanted to change it.
In most themes it’s really simple, and while it’s not overly complex in Coraline either I did have to dig a bit deeper. In most themes you can change it in tag.php and category.php pages, but Coraline does it a bit differently. Google wasn’t helpful either, so here’s what I did:
1. Go to Appearance &> Editor, and select loop.php file
2. Find the following code:
<?php if ( is_search() ) : // Display excerpts for search. ?&> <div&> <?php the_excerpt(); ?&> <!-- .entry-summary --&> <?php else : ?&> <div&> <?php the_content( __( 'Continue reading &<span&>→&', 'coraline' ) ); ?&> <?php wp_link_pages( array( 'before' =&> '&<div&>' . __( 'Pages:', 'coraline' ), 'after' =&> '&' ) ); ?&> <!-- .entry-content --&> <?php endif; ?&>
3. Replace the red text with the following:
And voila. Your category and tag archives will now show post excerpts with the “Continue Reading” link.
Some newer and popular themes allow you to change this behavior in the backend, but sometimes you just have to get your hands dirty and figure it out yourself. Hope you find this helpful.