Wordpress 설치시 만든 디자인을 구현하고 있습니다. 일부 갤러리 기능을 위해 첨부 파일을 사용했습니다.Wordpress 첨부 파일 (플러그인) 축소판 도움말
그러나 미리보기 이미지를 추가하는 방법을 찾지 못했습니다. 나 좀 도와 줄 수있어?
<?php
if(function_exists('attachments_get_attachments'))
{
$attachments = attachments_get_attachments();
$total_attachments = count($attachments);
if($total_attachments) : ?>
<?php for($i=0; $i<$total_attachments; $i++) : ?>
<a href="<?php echo $attachments[$i]['location']; ?>" style="float:left;" rel="<?php echo $attachments[$i]['mime']; ?>"><img src="<?php echo $attachments[$i]['location']; ?>" height="100" alt="<?php echo $attachments[$i]['title']; ?>" id="<?php echo $attachments[$i]['id']; ?>"><br><?php echo $attachments[$i]['caption']; ?></a>
<?php endfor; ?>
<?php endif; ?>
<?php } ?>
나는이 함께했는데, 그것은 나에게 도움이되지 않았다 :
<?php the_post_thumbnail(array(200,150)); ?>
미리 감사드립니다.
워드 프레스는 http://wordpress.stackexchange.com/에 자신의 네임 스페이스가 – powtac