【发布时间】:2014-05-28 13:56:41
【问题描述】:
我正在使用来自 Tie Labs 的 Wordpress 模板“Sahifa”,他们的支持论坛没有回答任何自定义问题,所以我想在这里寻求帮助。我通常使用 HTML/CSS 工作,并且对 PHP 比较陌生。
在滑块的底部有缩略图按钮,您可以单击它们,我们希望它调用与标题相同的标题信息。看来我会在<li> 和我所看到的“slider-thumbs”区域中寻找。我认为这是应该进行这些更改的代码部分:
<?php if( $slider_query != 'custom' ): ?>
<?php if( $featured_query->have_posts() ) : ?>
<div id="ei-slider" class="ei-slider">
<ul class="ei-slider-large">
<?php $i= 0;
while ( $featured_query->have_posts() ) : $featured_query->the_post(); $i++; ?>
<li>
<?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) : ?>
<a href="<?php the_permalink(); ?>"><?php tie_thumb( $size ); ?></a>
<?php endif; ?>
<div class="ei-title">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php if (tie_get_option( 'slider_caption' )) : ?><h3><?php echo tie_content_limit( get_the_excerpt() , $caption_length ) ?></h3><?php endif; ?>
</div>
</li>
<?php endwhile;?>
</ul>
<ul class="ei-slider-thumbs">
<li class="ei-slider-element">Current</li>
<?php $i= 0;
while ( $featured_query->have_posts() ) : $featured_query->the_post(); $i++; ?>
<li><a href="#">Slide <?php echo $i; ?><?php tie_thumb( 'tie-medium' ); ?></a></li>
<?php endwhile;?>
</ul><!-- ei-slider-thumbs -->
</div>
<?php endif; ?>
如何解决这个问题?
【问题讨论】:
标签: javascript php jquery wordpress slider