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


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


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:


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


I want this to become:


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


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.

  • 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 you have read our privacy policy.

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