@jamble
- Started
- Last post
- 5 Responses
- trooperbill
Noticed your new css showcase... is there an elegant way of having thumbnail images in wordpress posts without custom fields and messing about copy/pasting the address of images?
- neverblink0
you can get all attachments that are images in an array and display each of the predetermined sizes.
- just upload them (no need to insert into post)neverblink
- jamble0
Never really thought about it beyond the standard image upload functionality in WP or a custom field which hasn't proved that much hassle.
Took a quick look around though and this might be something to look at? http://www.seoadsensethemes.com/…
- trooperbill0
@neverblink ... hmm sounds like i'd need to be a php developer for that ;P
- trooperbill0
@jamble - nice ;)
- neverblink0
well, a wordpress dev' to be exact, it's a predetermined WP-function.
Put this in your loop to display all images you've uploaded for current post at "medium" size.
$args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => $post->ID
);
$attachments = get_posts($args);
if($attachments){
$thumb = wp_get_attachment_image_src($att...
foreach ($attachments as $attachment) {
print(wp_get_attachment_image($a... "medium"));
}
}- qbn clipped the longer sentences.. I'll put it online for youneverblink
- http://snipt.org/nTg…neverblink