Open justintadlock opened 7 years ago
Now that I've dug more into the theme, I see that you're consolidating each plugin's archive-type pages into a single template.
Now that I've dug more into the theme, I see that you're consolidating each plugin's archive-type pages into a single template.
Yes. I tried to avoid if else logic in archive.php
if I remember correctly. But I think about if I could with just archive.php
.
One of the main things I see as a "problem" from a purely development standpoint are the 5 different archive templates. Obviously, 4 of them are for specific plugins. However, there's really very little that's different with most of them. Personally, I'd strive to cut that down to a single
archive.php
template if possible.Wrapper:
Primarily, this is the code that gets changed in each template:
That's a lot of files for mostly just one change. I feel like a
checathlon_loop_wrapper_class
filter hook would do a better job.Jetpack title/desc:
The next thing is the archive title and description with Jetpack. It really seems like Jetpack should handle this on its own, but I digress.
What'd I'd do is filter
get_the_archive_title
andget_the_archive_description
to auto-add those Jetpack titles and descriptions in.Of course, some devs prefer to have the templates and not too much going on over in
functions.php
, so it's your call. I dislike having too many top-level templates if they can be avoided.