Where is the category page template in WordPress core?

Where is the category page template in WordPress core?

Talia

Member
Local time
06:23
Joined
Jan 21, 2020
Messages
84

OK, I'm honestly pretty confused. I'm working on a WordPress site and I just want to change the category template in a couple of simple ways - I want to make it so it shows the full posts instead of excerpts and I want to remove the "Category:" in front of the category name. This isn't something I've ever done before, and it looks like the theme I'm working off of (which is Understrap, specifically Understrap Child) doesn't have a category template. So I went to the WordPress core to find its category.php template, and I'm totally confused! The category.php file doesn't look at all like what I was expecting. It doesn't look like a template, it looks like a list of functions. According to official WordPress sources I've been reading (such as this), changing it to show full posts instead of excerpts should be as simple as replacing "the_excerpt()" with "the_content()", but the category.php file does not contain "the_excerpt()" or "the_content()" anywhere. I thought maybe category-template.php would be what I was looking for, but it doesn't look like it. And for the record, I can't find an archive.php either.

I'm just so confused as to what template is currently being used for the category pages because I can't find a file. Plus, I'm not sure what to work off of to create my new category template.

 

Talia

Member
Local time
06:23
Joined
Jan 21, 2020
Messages
84

After posting this, I realized Understrap does have an archive.php template, so that must be what it's based on. So now I'm wondering if WordPress core doesn't have an archive or category template and it has to be supplied by the theme??

 

Pandemix

MD developer
Gold Member
Local time
06:23
Joined
Feb 13, 2020
Messages
28

WordPress always falls back to index.php if the parent theme and child theme don't create those specific page templates. So you create your own category.php file in your child theme and for starters copy whatever is in the parent theme's index.php file so you can tweak it entirely.

 

Talia

Member
Local time
06:23
Joined
Jan 21, 2020
Messages
84

Yeah, I guess maybe I shouldn't have assumed core must have a category or archive template... thanks for the responses :)

 

JamePUB

New member
Local time
14:23
Joined
Mar 1, 2020
Messages
1

WordPress became overwhelming, for simple websites I prefer wix instead

 

Pandemix

MD developer
Gold Member
Local time
06:23
Joined
Feb 13, 2020
Messages
28

Yeah, I guess maybe I shouldn't have assumed core must have a category or archive template... thanks for the responses :)

It's not a bad assumption to make and when you realize that one file can power an entire site you start to see the old WordPress core philosophy of "Decisions, Not Options" really come into play.

It's debatable whether that is still a guiding principle with the heavy JS development that's been going on in core lately,though.

WordPress became overwhelming, for simple websites I prefer wix instead

In what ways have you also noticed WordPress become overwhelming?

 
Top