• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Hope its not a blonde moment: where is image.php or attachment.php?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Hope its not a blonde moment: where is image.php or attachment.php?

This topic is: not resolved

Tagged: attachment, editor, image, modern portfolio

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 1 month ago by David Chu.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 24, 2014 at 2:31 pm #102219
    AstroLass
    Member

    Hi!!

    I want to edit my image.php or attachment.php file, basically to make it look like a landing page - no author, date, header, footer, sidebar, etc. I am in "Editor" and have selected "Genesis" from the drop down combo box. Several templates are listed there, including single.php, but neither image.php nor attachment.php are listed. I have already copied and pasted code from landing-template.php that I want to copy in, I just can't find the file to copy it into. Help!!!!

    Thanks,

    Sandy Eulitt
    http://www.sandyeulitt.com (down for overhaul, back up soon *fingers crossed)

    http://www.sandyeulitt.com
    April 24, 2014 at 3:19 pm #102229
    David Chu
    Participant

    Sandy,
    You're not hallucinating at all. Those are not stock files in WP or Genesis, you'll only see them if you (or someone) has deliberately made them in their theme. I have never edited one of those, and I get around a bit. 😉 That's because I've never had a need to template those items in particular.

    I think you're on the right track by using landing-template.php if your theme has that. You could just copy that, rename it as one of those, and hack it to your satisfaction. Here's more info about those things:

    https://codex.wordpress.org/Template_Hierarchy#Attachment_display

    And a bit more with an example:
    http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-single-attachments-template-in-wordpress/

    Cheers, Dave


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

    April 24, 2014 at 4:21 pm #102239
    AstroLass
    Member

    Hi David -

    Thanks zillions for your reply. I am not sure I understand it all, so I am hoping you can help me out a bit further.

    I used to be a programmer, but never programmed in a full object oriented language. Most of my work was in Visual Basic, though I have also programmed in C and a little Java, but most of this was also, blissfully, almost 13 years ago. I am doing this work for my own business website, which is astronomy, space, and STEM Education. So, bear with me if I ask some really novice questions.

    If I understand you correctly, you are saying that I can copy my landing page template into a new file and rename it as attachment.php or image.php, right? OK, that's first. So, then, where do I rename it, and then upload it? Can I do that within WP, or do I have to copy the landing page code into an editor, like Notepad, then do the Save As, then upload to the rest of my WP files through my web hoster to get it into a place like WP content? Then, is it now a template that will just show up at the bottom of my image attachment page as a layout that I can choose, or do I have to edit each of these individually? Lastly, I took a screen shot of where my current image attachment page is getting called, and pasted it into Word. I'd like to post that here, but I don't think it will let me. Is there a way to attach it? Oh, and one last thing (really, this is it) what does the "code" and "close tags" buttons, above, for editing this reply, do?

    Thanks billions,

    Sandy

    April 24, 2014 at 7:56 pm #102260
    David Chu
    Participant

    Sandy,
    To be safe, probably best when copying, renaming, and moving files to use FTP, so you'd get to your server, navigate to the file you want, download, rename there, edit, and then upload the new one. Renaming doesn't really work in the WP editing screen, just editing.

    BUT... one thing I mentioned was bogus, as I was shooting from the hip. The part about copying the landing page template into a attachment.php or image.php.

    The landing page is a page template, and you'd activate that by making a Page, and then on the right of the edit screen, choose the Landing Page template from the template dropdown. In fact, you could try doing exactly that and see if that's close to what you want. A page template is different in structure from a single item

    If, in fact, you're looking to make an attachment.php or image.php, that gets very complicated, especially for a newbie. To get an attachment onto a Post, you'd make a Post, upload an image via "Media". As you're uploading, you'll see Attachment Details on the right. Scroll down, and choose "Link to Attachment Page". That's how you put your image.php to work! So then you save the Post, and view it. Click on the image on the Post, and that takes you to the "attachment" page! I'm guessing that isn't what you want.

    I never do this, as I have no need to, so that's why I was vague and a little off. Sorry about that. I probably shouldn't have weighed in.

    If you truly want to do that, you could make an image.php like in the tutorial page above, upload it to your child theme's folder, and then try the above method to get it to work.

    I hope that clears it up!
    Dave


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble