2011-08-30 3 views
0

내 WordPress 블로그에서 Nivo-Slider를 편집하려고합니다. 현재 이미지 캡션이 표시됩니다.Nivo-Slider에 WordPress에 게시물 제목 추가

<div id="slider"> 
<?php 
$n_slices = get_option('wpns_slices'); 
?> 
<?php query_posts('cat='.$category.'&posts_per_page=$n_slices'); if(have_posts()) : while( have_posts()) : the_post(); ?> 
<?php if(has_post_thumbnail()) : ?> 
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> 
<?php the_post_thumbnail(); ?> <!--Want to display Post Title here--> 
</a> 
<?php endif ?> 
<?php endwhile; endif;?> 
<?php wp_reset_query();?> 
</div> 

답변

0

그냥 다시 <?php the_title(); ?>을 사용합니다 :

<div id="slider"> 
<?php 
$n_slices = get_option('wpns_slices'); 
?> 
<?php query_posts('cat='.$category.'&posts_per_page=$n_slices'); if(have_posts()) : while( have_posts()) : the_post(); ?> 
<?php if(has_post_thumbnail()) : ?> 
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> 
<?php the_post_thumbnail(); ?> <?php the_title(); ?> 
</a> 
<?php endif ?> 
<?php endwhile; endif;?> 
<?php wp_reset_query();?> 
</div> 
여기 슬라이더의 코드는,이 게시물 제목을 표시 할 것
관련 문제