Results 1 to 3 of 3

Thread: Need to ad extra picture for extra field

  1. #1
    Thread Starter
    Member casa's Avatar
    Join Date
    Apr 2011
    Location
    France
    Posts
    59
    Thanks
    10
    Thanked 1 Time in 1 Post

    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&eacute;gorie&nbsp;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&eacute;gorie&nbsp;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&eacute;gorie&nbsp;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


  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,680
    Thanks
    166
    Thanked 3,385 Times in 3,256 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Member casa's Avatar
    Join Date
    Apr 2011
    Location
    France
    Posts
    59
    Thanks
    10
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [TUTORIAL] How to Add an extra field in the user profile and inherit them in ads
    By dikiyforester in forum ClassiPress General Discussion
    Replies: 113
    Last Post: January 14th, 2014, 04:06 AM
  2. Extra comment Field ( drop down list) Guys use your brain
    By hazara in forum ClassiPress General Discussion
    Replies: 1
    Last Post: October 17th, 2011, 08:54 PM
  3. Add a extra field to the search option
    By dschn1978 in forum ClassiPress General Discussion
    Replies: 1
    Last Post: October 13th, 2010, 08:32 AM