3

I have this new WP webiste I’m working on. Today I was going to design the attachment.php page so that my image pages would look nice, but found that I was getting a 404 for all of them actually. I’ve tried everything I could think of…

  • I’ve tried deactivating all plugins, nothing changed.
  • I’ve tried changing the theme to twenty sixteen, nothing changed.
  • I’ve tried going to the permalinks page and resaving the structure, nothing changed.

But then I’ve found two things that kind of worked, but I’m not able to really take these clues any further myself. These are the things I’ve tried that actually changed something:

Any hints as to what might be the problem here would be greatly appreciated.

Thanks in advance.

  • Why don't you share your attachment.php or other snippet that you already tried ? – Mohammad Limon Sep 15 '16 at 20:09
  • @mlbd, thanks for your input. I really don't think the issue is with the code in the attachment.php file as images that are uploaded directly to the media gallery (as oposed to though a post) do show up correctly. Also the same thing happens even with Twenty Sixteen which I'm pretty sure has a good code in it's single.php (since it doesent have an attachment.php) – Guillermo Carone Sep 15 '16 at 20:15
  • You already said that you working in a new site so their is no question about .htaccess issue and also their are some reason wp sent 404 error on attachment page if that site was just migrate or used some larger plugin who are integrate with .media library. But on your case it's different. By the way did you try this jimjulian.com/tech/wordpress-media-attachment-page-404-error ? – Mohammad Limon Sep 15 '16 at 20:49
  • @mlbd Thanks. I'm not using any plugins that deal with the media library that I know of... actually I'm only using two main plugins, ACF and qtranslateX. I've tried disabling them both with no luck. I'll give the solution form the link you provided a try – Guillermo Carone Sep 15 '16 at 21:03
  • Found it! It's the plugin "qTranslate slug" which is causing the issue. Now I need to figure out what exactly it is breaking... – Guillermo Carone Sep 15 '16 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.