andkon
Member
Posted 11 months ago #
I'm trying to help someone setup a new blog. I want to insert thumbnail images and have those link to the attachment page with the full-sized images. Currently I can only 1) post in the entry itself the full-sized images OR 2) post thumbnails that link to the full-sized image directly OR 3) post thumbnails that link to the attachment page but with a smaller and resized image.
I want thumbnail images that link to the attachment page that has a fully sized image, not resized, for example not this: http://meetthegods.com/?attachment_id=17 (The actual image is much bigger, this.)
I know HTML/CSS, what do I do? Thanks!
andkon
Member
Posted 11 months ago #
Anyone? Help would be much appreciated!
andkon
Member
Posted 11 months ago #
Anyone know where and which file I need to edit?
andkon
Member
Posted 11 months ago #
Solved:
wp-includes --> post-template.php -->
function prepend_attachment($content) {
$p = '<p class="attachment">';
$p .= get_the_attachment_link(false, true, array(400, 300));
$p .= '</p>';
$p = apply_filters('prepend_attachment', $p);
return "$p\n$content";
}
Change the array(x,y) to whatever maximum value you want!
thanks a lot for the solution. I spent days trying to figure it out.