WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#18571 closed enhancement (fixed)

Not possible to edit a media item's slug

Reported by: johnbillion Owned by:
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.2.1
Component: Media Keywords:
Focuses: Cc:

Description

It's not possible to edit the post_name field of a media item. This means there's no control over the slug used when viewing a media item attached to a post at example.com/my-blog-post/my-media-item/.

A media item's slug uses the filename (minus extension) by default. This isn't always desirable and it'd be nice to be able to change it.

I know media management is undergoing an overhaul in the near future so is it worthwhile my doing a patch?

Change History (3)

comment:1 @GaryJ3 years ago

There's a nice plugin that does what you want: http://wordpress.org/extend/plugins/slug4apig/

Media slugs still have to be unique (WP will add a suffix if it's not, just as it does with post names), even if the media are attached (and therefore get the URL prefix from) to different posts.

comment:2 @johnbillion2 years ago

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed in [21948].

comment:3 @SergeyBiryukov2 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 3.5
Note: See TracTickets for help on using tickets.