Created
December 20, 2013 23:16
-
-
Save shazdeh/8063162 to your computer and use it in GitHub Desktop.
Custom size for images displayed in attachment pages
This file contains hidden or 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
<?php | |
function custom_attachment_size( $content ) { | |
if( is_attachment() ) { | |
global $post; | |
$content = wp_get_attachment_image( $post->ID, 'large' ); | |
} | |
return $content; | |
} | |
add_filter( 'the_content', 'custom_attachment_size' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment