WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

#49010 closed enhancement (wontfix)

Deprecate attachment page and its template

Reported by: tyxla Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: template Cc:

Description

As we all know, WordPress media attachments are a specific post type, and as such, they have their own page and support custom templating by the attachment* scheme in themes.

Something I've noticed on many sites, though (including some big ones) is that the attachment templates aren't styled, and the attachment pages don't look well. In the same time, they're public by default, and indexed by search engines, and often end up on the first pages of results.

In my experience with WordPress I haven't found those attachment pages useful, and I believe it would be better if they are deprecated.

One backwards-compatible way to do it would be to redirect those attachment pages to the attachment file itself.

How does everyone feel about that?

Change History (2)

#1 @garrett-eclipse
5 months ago

Personally we've used attachment pages for corporate and personal websites. For corporate the implementation is usually for a Document Library to supplement the PDF/DOC file with more information. For personal the implementation was usually for photographers so they could provide additional information and sharing capabilities for their images.

There are also plugins that redirect the attachment pages to the attachment file so what you're seeking is already available.

In my opinion, I would keep the feature as there's a myriad of use cases and benefits and for those who find it undesirable they can disable with a simple plugin.

#2 @johnbillion
5 months ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
  • Version trunk deleted

Most photography-focused themes supply attachment templates that provide extra meta data for images. I've seen plenty of examples of the same for PDF files, videos, audio, etc.

This isn't something that can or should be removed from WordPress core. If your theme doesn't present attachments in a good way then you should contact your theme author and ask them to look into it.

Note: See TracTickets for help on using tickets.