Title: azezer's Replies | WordPress.org

---

# azezer

  [  ](https://wordpress.org/support/users/azezer/)

 *   [Profile](https://wordpress.org/support/users/azezer/)
 *   [Topics Started](https://wordpress.org/support/users/azezer/topics/)
 *   [Replies Created](https://wordpress.org/support/users/azezer/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/azezer/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/azezer/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/azezer/engagements/)
 *   [Favorites](https://wordpress.org/support/users/azezer/favorites/)

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Custom field, multiple values](https://wordpress.org/support/topic/custom-field-multiple-values/)
 *  Thread Starter [azezer](https://wordpress.org/support/users/azezer/)
 * (@azezer)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/custom-field-multiple-values/#post-1166842)
 * I finally saw the error, i forgot a = after src at the image.
 * The code works =) sweet.
 * Now to implement the Timtumb into this to, but thats another story.
 * Thanks for help stvwlf.
 * Tread solved
 * //Azezer
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Custom field, multiple values](https://wordpress.org/support/topic/custom-field-multiple-values/)
 *  Thread Starter [azezer](https://wordpress.org/support/users/azezer/)
 * (@azezer)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/custom-field-multiple-values/#post-1166833)
 * Now i continued a bit and got this far:
 *     ```
       <?php
       $products = get_post_meta($post->ID, "product", false); 
   
       if ($products[0]=="") { ?>
   
       <!-- If there are no custom fields, show nothing -->
   
       <?php } else { ?>
   
       <div class="produktbeskrivning">
       	<h3>Products</h3>
   
       <?php foreach($products as $product) {
   
       $temp = explode("&", "$product");
         $descrip = $temp[0];
         $price = $temp[1];
         $img = $temp[2];
   
       echo '<div class="grid">'.$descrip.'&nbsp;&nbsp;&nbsp;'.$price.'&nbsp;&nbsp;&nbsp;<img src"'.$img.'" /></div>'; } ?>
   
       </div>
   
       <?php } ?>
       ```
   
 * But i cant get the image to show.
 * I print this in custom field product:
 * Product&299:-&[http://xxxxxx.com/wp-content/uploads/image.jpg](http://xxxxxx.com/wp-content/uploads/image.jpg)
 * Do i miss something so that the server gets that it is a image to fetch?
 * Azezer
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Custom field, multiple values](https://wordpress.org/support/topic/custom-field-multiple-values/)
 *  Thread Starter [azezer](https://wordpress.org/support/users/azezer/)
 * (@azezer)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/custom-field-multiple-values/#post-1166832)
 * I think i can use something like this:
    `"<img src='" . $img . "' />"`
 * to implemate in this:
 *     ```
       <?php
       $products = get_post_meta($post->ID, "product", false); 
   
       if ($products[0]=="") { ?>
   
       <!-- If there are no custom fields, show nothing -->
   
       <?php } else { ?>
   
       <div class="produktbeskrivning">
       	<h3>Products</h3>
   
       <?php foreach($products as $product) {
   
       $temp = explode("&", "$product");
         $descrip = $temp[0];
         $price = $temp[1];
         $img = $temp[2];
   
       echo '<div class="grid">'.$descrip.'&nbsp;&nbsp;&nbsp;'.$price.'</div>'; } ?>
   
       </div>
   
       <?php } ?>
       ```
   
 * Ive tried to put in in after $price, but it gave me error ” blank page “.
 * search continues
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Custom field, multiple values](https://wordpress.org/support/topic/custom-field-multiple-values/)
 *  Thread Starter [azezer](https://wordpress.org/support/users/azezer/)
 * (@azezer)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/custom-field-multiple-values/#post-1166828)
 * Thanks stvwlf.
 * works like a charm, found som minor errors in the code like, { instead of [ at
   the temp variable.
 * foreach($products as $product // why do we say, $products as $product ?
    Is it
   so that $ products is a multiple value and we want to declare that we can use
   it as $product several times?
 * Now i want to implement a <img> above each Product.
 * Will try to do this when i get home from work, maybe i can manage that myself.
 * Azezer
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Custom field, multiple values](https://wordpress.org/support/topic/custom-field-multiple-values/)
 *  Thread Starter [azezer](https://wordpress.org/support/users/azezer/)
 * (@azezer)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/custom-field-multiple-values/#post-1166817)
 * Anybody who has a tip where i can read about this and more?
 * Azezer
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Custom field, multiple values](https://wordpress.org/support/topic/custom-field-multiple-values/)
 *  Thread Starter [azezer](https://wordpress.org/support/users/azezer/)
 * (@azezer)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/custom-field-multiple-values/#post-1166686)
 * Thank u!
 * Now i got a output of that seccond_value.
 * But still only if i have a true statement of that value.
 * I guess that a need to do that foreach statement for the seccond value as well,
   but how do i combine theese two, or three … for that matter.
 * `<?php foreach($description as $description)` _// how to add $seccond\_value 
   here?_
 * Another question that popped up is if i can combine two $values if i always wants
   the to be together.
 * Like description and price.
 *     ```
       $description
         $price
       ```
   
 * I mean to save code space and only declare thoose two one time, nd then have 
   1 combined vale like $product ?.

Viewing 6 replies - 1 through 6 (of 6 total)