我正在使用自定义主题,我需要找到一种方法将标题换行到第二行。主题有一个轮播,标题显示在下方。目前,如果标题太长,则后面有“...”。我怎样才能阻止它并让它换行到第二行?
这是来自主题的代码
<div class="home-carousel">
<ul>
<?php
$carimgheight = 120;
if ( get_option('storefront_carousel_img_height' )) {$carimgheight = get_option('storefront_carousel_img_height' ); }
$carimgwidth = 200;
if ( get_option('storefront_carousel_img_number' ) == 2 ) {$carimgwidth = 428;}
if ( get_option('storefront_carousel_img_number' ) == 3 ) {$carimgwidth = 276;}
if ( get_option('storefront_carousel_img_number' ) == 5 ) {$carimgwidth = 154;}
if ( get_option('storefront_carousel_img_number' ) == 6 ) {$carimgwidth = 124;}
//BEGIN Slider LOOP
$loopcarousel = new WP_Query( array( 'post_type' => 'carousel' ) );
while ( $loopcarousel->have_posts() ) : $loopcarousel->the_post();
$buttonlink = get_post_meta($post->ID, "link", true);
if(has_post_thumbnail()) {
$carthumb = get_post_thumbnail_id();
$carimage = vt_resize( $carthumb, '', $carimgwidth, $carimgheight, true );
}
?>
<li>
<a href="<?php echo $buttonlink; ?>" title="<?php the_title(); ?>"><img alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $carimage['url']; ?>" width="<?php echo $carimage['width']; ?>" height="<?php echo $carimage['height']; ?>" /><?php if ( get_option('storefront_carousel_image_only') == "false" ) { ?><p><span class="carousel-title"><?php echo the_title(); ?></span></p><?php } ?></a>
</li>
<?php endwhile; //END SLIDER LOOP ?>
</ul>