Modify the attachment pages for my Child Theme

I would like to modify the single attachment page look to not just show a link. I would like for it to actually show the document/media on the page. I have found the singles php pages that I need to modify but the PHP is a little beyond my level. I found this article, and it is basically what I am looking at doing but since I have a purchased theme, it is not a simple as the article makes it out…

  • Kasia Swiderska
    • Support nomad

    Hello Deborah,

    Would you mind allowing support access so we can have a closer look at this? Each theme is different so I would need to check the structure of files in your theme and check how you can add right function there to display images.

    To enable support access you can follow this guide here:

    Also you should make changes only on child theme, not the theme you purchased so there will ne no problems with future updates

    kind regards,


  • Whitney
    • Flash Drive

    Good morning! I have activated support. And I have also reached out to the developer of the theme… I asked for him to explain the single.php files to me and this is what he responded with. Hope it helps.

    “”thanks for purchase! I guess you are familiar with concept of modifying theme via child theme, but just for a record: You can copy (almost) any file from theme’s root folder into your child theme’s root folder to override it. File single.php is used for a post detail page, however the TownPress codebase is a bit dated, so instead of standard single.php there is article.php file which handles standard WordPress posts (in this case, the file handles both archive and detail page). For other post types (events, galleries, notices, etc.) there is single-POSTTYPE.php file where POSTTYPE is the name of the custom post type. For example single-lsvrevent.php for Event post type. Those files handle only the post detail page. If you want to edit the archive code you can use archive-POSTYPE.php files.

    So, just copy any of those files in your child theme’s folder and start messing around with it. If you break something, simply remove the file and copy it again from parent theme’s folder. As long as you are not doing it on a live site, have fun with it:slight_smile:””

    I have not copied any files yet but I was planning on doing it as soon as I can. I go live on Saturday.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.