<p> <a href="<?php echo article_custom_field('8'); ?>"> download</a></p>
voila je l ai trouvé , mais le probeleme c'est que meme dans les articles qui n 'ont pas d'article , le le lien download s'affiche
pourriez vous m aide avec une condition quant l article contiendra le fichier il s'affiche le le lien si non il s'affiche pas!!
voila le code de la section :
1 2 3 4 5 6 7 8 9 10
| <section class="content">
<?php if(has_posts()) : while(posts()) : ?>
<article><figure><img src="<?php echo article_custom_field('2');?>"></img></figure>
<h2><a href="<?php echo article_url(); ?>" title="<?php echo article_title(); ?>"><?php echo article_title(); ?></a></h2>
<p>download : <a href="<?php echo article_custom_field('8'); ?>"> download</a></p>
<p><?php echo article_description(); ?></p>
<p><a href="<?php echo article_url(); ?>">(Read More)</a></p>
</article>
<?php endwhile; endif; ?>
</section> |
Partager