Created
January 27, 2013 02:45
-
-
Save jimmyhillis/4645969 to your computer and use it in GitHub Desktop.
Simple stub to use within a Wordpress template for building a full size image page, which will be seen whenever you view the permalink for any images in a Wordpress blog. Add this to your theme with the filename `image.php` to use this for all images. Might also consider using `attachment.php` or `single-attachment.php` depending on your situation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<article class="article"> | |
<?php $attachment_info = getimagesize($post->guid); ;?> | |
<div class="content"> | |
<img src="<?php echo $post->guid; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" <?php echo $attachment_info[3]; ?> /> | |
</div> | |
<a href="<?php echo get_permalink($post->post_parent); ?>" title="<?php echo get_the_title($post->post_parent); ?>">Back to <?php echo get_the_title($post->post_parent); ?></a> | |
</article> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment