When I released WP Custom Category Pages, I wanted the category pages to not display any snippets or excerpts as to not create duplicate content. I’ve gotten a lot of emails about how to add this functionality to the tool though. Fortunately, it is really easy.
- Go to the plugins tab in the left hand navigation and click editor.
- Select WP Custom Category Pages.
- Select the “/wp-custom-category-pages/templates/archive_category.php” file to edit.
- Then add the code below after the post title is called.
- Hit the “Update File” button.
Post Title:
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
Snippet Code
Add the following code right after the post title to add the excerpt:
<p><?php the_excerpt(); ?></p>
Below is a picture showing how this should look.
[wordpressresources]
Hi Geoff,
Turns a good plug-in into a great one for me!!
I made a further amendment to the plugin, replacing the_excerpt with the_content to get a full version of the post on the archive page. Realise this contravenes your duplicate content goal pretty badly but it works for the UX I want to deliver