J'ai des bannières de slider sur ma page d'accueil qui ne lient pas à n'importe où. De quel code ai-je besoin pour ajouter des liens pour chaque image? Est-il possible avec le code ci-dessous ?:Ajouter des liens vers des bannières de slider
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>
Merci! Je dois ajouter un lien différent à chaque bannière –
@SophieMitchell J'ai édité ma réponse pour vous. –
Cela a fonctionné. Je vous remercie! –