0

On one of my sites if a post's permalink is as follows:

http://example.com/side-view-of-sheikh-zayed-grand-mosque-in-abu-dhabi-united-arab-emirates/

the attachment page for the thumbnail image (i.e. featured image) will be like this:

http://example.com/side-view-of-sheikh-zayed-grand-mosque-in-abu-dhabi-united-arab-emirates/side-view-of-sheikh-zayed-grand-mosque-in-abu-dhabi-united-arab-emirates-2/

In other words, the attachment page URL is a repetition of the parent post's URL (sometimes with a '2' slapped on it at the end like in the example).

I want to make the attachment page URLs like this:

http://example.com/post-url/artwork-detail/

I also pass GET parameters to the attachment pages like this:

http://example.com/post-url/post-url?size=400

I want this to become:

http://example.com/post-url/artwork-detail/size-400

The URL duplication is my big concern, the GET translation isn't a priority so long as the parameters aren't lost.

1 Answer 1

1

The attachment page generally gets the "title" value as it's slug. Are you not filling in the image information like title, caption, etc? Might give that a try.

1
  • Ah thank you! I realize that this is the issue. I have code that grabs the parent post's title and uses it as the image title (which is then used to rename the image file). In this case I will change my code to work on another image attribute to avoid this duplication. Aug 26, 2012 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.