Slug for attached posts by image galleries

The Slug4apig plugin allows WP users to edit the SEO friendly URL (aka slug) for the autogenerated attachment
posts created by the built WP gallery.

Author:Claudio Pascual (profile at wordpress.org)
WordPress version required:2.5
WordPress version tested:3.0.5
Plugin version:1.0
Added to WordPress repository:17-03-2011
Last updated:17-03-2011
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://www.pascualyco.com/Slug4apig.tgz
Total downloads:2 710
Active installs:30+
plugin download
Click to start download

Slug4apig (Slug for attached posts from image galleries) is probably the simplest plugin ever seen, though of
imperative need for the WordPress community.

This plugin just adds a field to each image inserted through the WordPress built-in gallery interface. As easy as you edit
the name, description, etc. for each image, with Slug4apig you will be able to edit the friendly URL (aka slug)
and set the desired value.

By default, the WordPress built-in gallery will set the attachment post’s slug to the name of the image you inserted in
the gallery (minus .extension). This is a rather restrictive approach, as your images may have sequencial names
assigned automatically by the photo camera, like “S4100001.JPG”.

In the previous example, an autocreated attachment post would be created under the hypothetical URL:

http://example.com/2011/03/post-title/S4100001/

and a search on, i.e. Google, will show “S4100001” as the title for the page, which is senseless for the search
engine users, robots, and SEO activities in general. Suppose the image is from a bike; then you will like the URL
to be relevant, like:

http://example.com/2011/03/post-title/bike/

wich is SEO friendly. There is no magic, you just set the attachment post name to overwrite the default with the name
of your choice!

Remember to use valid, unreserved characters for the slug. Characters that are allowed in an URI but do not have a
reserved purpose are called unreserved. These include uppercase and lowercase letters, decimal digits, hyphen, period,
underscore, and tilde.

Future enhancements

  • Slug name validation
  • Batch jobs support

FAQ