Title: Custom Fields Nightmare&#8230;
Last modified: August 19, 2016

---

# Custom Fields Nightmare…

 *  [diceone](https://wordpress.org/support/users/diceone/)
 * (@diceone)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/custom-fields-nightmare/)
 * I’m having serious troubles implementing a simple custom field usage.
    It makes
   me want to cry and burn down my house. Why wordpress… Why?
 * I’d very much like to use a custom field to have a nice image header before my
   post title and title.
 * I’m not sure why or how, but custom fields with images just do not seem to work.
   
   These things don’t even need CSS.
 * They just need to show up.
    I’d like the site to look like this: [http://www.bedaandseanmakemesick.com/images/wpblog.jpg](http://www.bedaandseanmakemesick.com/images/wpblog.jpg)

Viewing 1 replies (of 1 total)

 *  [syncbox](https://wordpress.org/support/users/syncbox/)
 * (@syncbox)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/custom-fields-nightmare/#post-689461)
 * they will work. I use the c2c_get_custom() plugin to get the meta data but the
   big issue is to be sure to logically plan how you are writing the results…
 * rather than entering the html associated with the image, just use the file name
   and in the code calling the field values, add the tag and such…
 * for example, using c2c_get_custom plugin, let’s assume I put the image file name“
   foo.jpg” into a custom key named “post-pic”:
 *     ```
       <?php
       echo c2c_get_custom('post-pic','<img src="/wp-content/themes/mythemesname/images/','" />','','');
       ?>
       ```
   
 * if you have several pictures, you’d add several fields (using the same key) and
   you’d place a space in the 4th parameter to tell WP to show more than one field.
 * from the [http://www.coffee2code.com](http://www.coffee2code.com) website’s information
   about the plugin:
 * function c2c_get_custom ($field, $before=”, $after=”, $none=”, $between=”, $before_last
   =”)
 *  * $field : This is the name of the custom field you wish to display
    * $before:
   The text/HTML to display before all field value(s) * $after : The text/HTML to
   display after all field value(s) * $none : The text/HTML to display in place 
   of the field value should no field value exists; if defined as ” and no field
   value exists, then nothing (including no $before and $after) gets displayed *
   $between : The text/HTML to display between multiple occurrences of the custom
   field; if defined as “, then only the first instance will be used * $before_last:
   The text to display between the next-to-last and last items listed when multiple
   occurrences of the custom field; $between MUST be set to something other than”
   for this to take effect
 * HTH

Viewing 1 replies (of 1 total)

The topic ‘Custom Fields Nightmare…’ is closed to new replies.

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [frustration](https://wordpress.org/support/topic-tag/frustration/)
 * [images](https://wordpress.org/support/topic-tag/images/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [syncbox](https://wordpress.org/support/users/syncbox/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/custom-fields-nightmare/#post-689461)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
