stereopoly
Member
Posted 7 months ago #
hey guys,
when using the standard gallery within my articles, the images will be opened on a new page. that's nice. but how can i edit this new page? where do i find the code? is it simply the page.php or stuff like that?
for example: i'd love to remove the title from this image-page and also the sidebar. but how to? hope you understand my english! if not: please ask. i really need your help! thanks.
When a visitor clicks on an image whose link has been set to Post URL, Wordpress looks for certain templates in the following order:
- image.php
- attachment.php
- single.php
- index.php
So, if you do not currently have an image.php or attachment.php file in your theme, you'll need to create one first. I'd suggest you make a copy of single.php to get you started, then strip out the sidebar and image title as needed.
stereopoly
Member
Posted 7 months ago #
Thanks! One more problem: when havin made a copy of single.php and renamin it into image.php, it works: every image in a gallery will use this template, but there is no image shown on its single-page. any ideas?
@stereopoly,
I would suggest that you base you image.php file on the default theme's image.php... there are special template tags that are not used in page.php. Some of which are:
wp_get_attachment_url()
previous_image_link()
next_image_link()
Also, see this plugin if you do not like how WordPress uses images for it's previous and next navigation:
http://mfields.org/wordpress-plugins/text-based-image-links/