- This topic has 3 replies, 2 voices, and was last updated 8 years, 2 months ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
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.
I don't know what is going on, but it is consistent. Whenever I add either image.php or attachment.php to a Pro theme (I am working mostly with Lifestyle Pro, but have tested several other Pro themes, same problem) when the Attachment page is then viewed from the gallery the image for the Attachment page is not there. I have tried many versions of coding the image.php page, the last try was merely copying the page_landing.php page and renaming as image.php. I have tried code that has been posted here. I have tried several websites and all the same results. As soon as I upload the custom attachment page I have made, the image on the Attachment page disappears. If I remove the custom page, the image is there again, but I can't customize the attachment page which I need to do.
Is anyone else have this issue? Older themes like Streamline are working fine. Most of my sites are at the current WP version and Genesis version, but this is also happening on a site with WP 4.2 and Genesis 2.12
Link to one example is below (this is a custom theme based on Lifestyle, but the problem exists if I use Lifestyle with no changes to the code at all)
Take a look at this article by Brad Dalton, perhaps it will help: http://wpsites.net/web-design/genesis-basic-custom-attachment-page/
That is the code I am i tried first for the Attachment page. I do not get any image showing up in the Pro themes I am using if I use image.php or attachment.php.
I just did another test of the Sample theme and again if I add the image.php the attachment image is gone from the attachment page. I use Espresso to figure out my CSS, I can navigate a page and see all of the elements. When I don't use image.php in the theme I see the image with a class of img.attachment-medium. When I add image.php back into the theme the image.attachment-medium is gone, the p.attachment is gone and even div.entry-content is gone from the attachment page. All that is there is entry -meta, entry-title and this section - article.post-192.attachment.type-attachment.status-inherit.entry.has-post-thumbnail
This is driving me crazy, it is crucial for one of my projects to have custom attachment pages and I would rather not go backwards to the xml style themes and move forward to the html 5 themes.
© 2023 WPEngine, Inc.