101 pointsSerious WPMU DEV-sterI'm new here
omgitsrfb
Member
—
9th August 2010
When inserting a gallery and linking the photos to an attachment page I would rather have full size images versus the medium size attachments for the photo gallery. There doesn't appear to be an attachment.php file with this theme. Any suggestions on how I could get the default display for gallery attachments to equal full size?
When inserting a gallery and linking the photos to an attachment page I would rather have full size images versus the medium size attachments for the photo gallery. There doesn't appear to be an attachment.php file with this theme. Any suggestions on how I could get the default display for gallery attachments to equal full size?
Yeah, there's not an attachment.php file with this theme. However, you could grab the BP Scholar theme and see how it is done there. Another good theme to look at for the attachment.php is the new default WordPress 2010 theme.
For instance, it's got this handy piece of code around line 47: if ( wp_attachment_is_image() ) {
echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten'),
sprintf( '%3$s × %4$s',
wp_get_attachment_url(),
esc_attr( __('Link to full-size image', 'twentyten') ),
$metadata['width'],
$metadata['height']
)
);
}
@masonjames
that's a nifty bit of code for sure. I got the attachment page working by using the Scholar page as you suggested but not sure how to make the images display as full sized when clicked on in the gallery yet. I'm still working on it.
Responses (2)
Sales & Support Lead — 10th August 2010 #
Hiya,
Yeah, there's not an attachment.php file with this theme. However, you could grab the BP Scholar theme and see how it is done there. Another good theme to look at for the attachment.php is the new default WordPress 2010 theme.
For instance, it's got this handy piece of code around line 47:
if ( wp_attachment_is_image() ) {echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten'),
sprintf( '%3$s × %4$s',
wp_get_attachment_url(),
esc_attr( __('Link to full-size image', 'twentyten') ),
$metadata['width'],
$metadata['height']
)
);
}
Hope that helps ya get started!
Member — 10th August 2010 #
@masonjames
that's a nifty bit of code for sure. I got the attachment page working by using the Scholar page as you suggested but not sure how to make the images display as full sized when clicked on in the gallery yet. I'm still working on it.
Become a member