Home » misc » Coraline WP Theme: Show Post Excerpts On Category & Tag Pages

Coraline WP Theme: Show Post Excerpts On Category & Tag Pages

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. ?&>
 <?php the_excerpt(); ?&>
 <!-- .entry-summary --&>
 <?php else : ?&>
 <?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:

 <?php the_excerpt

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.

Post a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>