Title: attachment.php not working
Last modified: August 18, 2016

---

# attachment.php not working

 *  [Rob22](https://wordpress.org/support/users/rob22/)
 * (@rob22)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/attachmentphp-not-working/)
 * Im new to WordPress and have been having trouble with attachment.php. I’ve searched
   support and forums but haven’t found any workable answers.
    If I do a “link to
   page” on an image and I have an attachment.php file, the attachment page only
   works when I’m logged in as administrator. Otherwise, I get a None Found message.
 * I’ve tried changing some of the php lines to see how it impacts the page (good
   way to learn), but not successful.
    Some answers in the forum suggest the problem
   is a bad post_parent number in the database, but I’m not familiar with how to
   change that.
 * What I’d like to see is a page of code for a basic attachment.php file that works.
   I’d like to be able to show the image with the basic information about it, with
   a comments form.
    Is there already one that I haven’t found?
 * Thanks

The topic ‘attachment.php not working’ is closed to new replies.

## Tags

 * [link to page](https://wordpress.org/support/topic-tag/link-to-page/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Rob22](https://wordpress.org/support/users/rob22/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/attachmentphp-not-working/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
