Skip to content

Archive templates #7

@justintadlock

Description

@justintadlock

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:

echo '<div class="blog-wrapper">';

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 and get_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions