How to show excerpts for Category pages instead of full posts
-
I want to show excerpts when someone clicks on a Category link. Currently, it shows full blog posts. This makes for a very long page. I think I found something in archive.php that explains what to do, but I don’t understand it. Here’s what I found:
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( ‘content’, get_post_format() );
?>So, I would create a file called (let’s say) “content-excerpt.php” and then upload it into the same directory as archive.php. I don’t know what that file will look like (that’s Problem #1), so I need help with that. I also don’t know how to “call” it in the archive.php file (that’s Problem #2). Do I change the line “get_template_part(‘content’,get_post_format() ); to get_template_part(‘content-excerpt’,get_post_format() ); ?
If you have an example file it would help me. I’m not afraid to experiment a bit so if I had a starting point I may be able to figure things out. As long as I end up with a page full of excerpts rather than full posts I’m happy. Would be great if I could make it match the look of my page https://christianboyce.com/every-blog-post. That page seems to be formatted in a very default way and I like it a lot.
Excerpts like the ones here https://christianboyce.com/every-blog-post would be nice for searches too.
- The topic ‘How to show excerpts for Category pages instead of full posts’ is closed to new replies.