Need to ad extra picture for extra field
Hi,
On each ad, I added seven categories.
Diagnostic: A,B,C,D....G
picture 1
picture-1.jpg
I would like for each ad afiche drawing
corresponding to each diagnosis. (7 drawings)
picture 2
picture-2.jpg
On sigle_ad_listing.php i write:
<?php
$diag = (get_post_meta( $post->ID, 'cp_diagnostic', true ));
echo "$diag";
if ($diag == "Catégorie A"){
echo "<img src=\"http://localhost/wordpress/
wp-content/uploads/2012/01/dpe-a.jpg\" border=\"0\" width=\"180\" height=\"180\" alt=\"diagnostic immobilier catégorie C\">";
}
if ($diag == "Catégorie B"){
echo "<img src=\"http://localhost/wordpress/
wp-content/uploads/2012/01/dpe-b.jpg\" border=\"0\" width=\"180\" height=\"180\" alt=\"diagnostic immobilier catégorie C\">";
}
if ($diag == "Catégorie C"){
echo "<img src=\"http://localhost/wordpress/
wp-content/uploads/2012/01/dpe-c.jpg\" border=\"0\" width=\"180\" height=\"180\" alt=\"diagnostic immobilier catégorie C\">";
}
................................................
echo "$diag"; is just for check. I get "Catégorie C" or B .... with "echo $diag"
But no corresponding image is posted
someone can it help me ?
Thanks
casa