April 24, 2014 at 2:31 pm #102219AstroLassMember
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!!!!
http://www.sandyeulitt.com (down for overhaul, back up soon *fingers crossed)April 24, 2014 at 3:19 pm #102229David ChuParticipant
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:
And a bit more with an example:
Dave Chu · Custom WordPress Developer – likes collaborating with DesignersApril 24, 2014 at 4:21 pm #102239AstroLassMember
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?
SandyApril 24, 2014 at 7:56 pm #102260David ChuParticipant
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 Chu · Custom WordPress Developer – likes collaborating with Designers
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.