Outils pour utilisateurs

Outils du site


webdev:wordpress:plugins:acf

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

webdev:wordpress:plugins:acf [23/11/2017 14:37] – créée dolowebdev:wordpress:plugins:acf [23/11/2017 14:38] (Version actuelle) – [Intégrer une image ACF :] dolo
Ligne 1: Ligne 1:
 +====== Advanced custom fields ======
 +[[webdev:plugins|Plugins, avis]]\\
 +[[http://www.advancedcustomfields.com/resources/|Documentation]]
  
 +==== Intégrer une image ACF : ====
 +<Code:php linenums>if( get_field('image_produit') )
 +{
 +    $img = get_field('image_produit');
 +    echo '<img src="'.$img['url'].'" alt="'.$img['alt'].'" width="'.$img['width'].'" height="'.$img['height'].'" style="max-width:'.$img['width'].'px;max-height:'.$img['height'].'px;" />';
 +}</Code>