0
ホームページにはどこにもリンクしていないスライダーバナーがあります。各画像のリンクを追加するにはどのようなコードが必要ですか?以下のコードで可能ですか?:スライダーバナーへのリンクを追加
Thank you! I need to add a different link to each banner. The banners are all going to the printf('<a href="yourlink.html"> link. What am I doing wrong? <div id="home">
<div class="banner">
<div class="banner-slider">
<?php
if (!empty($options['slider_photo'])):
$slider_photos = explode(',', $options['slider_photo']);
foreach ($slider_photos as $k => $img):
printf('<a href="http://www.nemotile.com/tile/product/Handwritten/"><div class="banner-%d" style="background-image:url(%s)"></div></a>', $k, $img);
endforeach;
else: ?>
<a href="http://www.nemotile.com/tile/product/Handwritten/"><div class="banner-1"></div></a>
<a href="http://www.nemotile.com/tile/product/patchwork/"><div class="banner-2"></div>
<a href="http://www.nemotile.com/tile/product/BisazzaCementTiles/"><div class="banner-3"></div>
<div class="banner-5"></div>
<?php endif; ?>
</div>
ありがとうございます!私は各バナーに別のリンクを追加する必要があります –
@SophieMitchell私はあなたのために私の答えを編集しました。 –
それはうまくいった。ありがとうございました! –