Title: Default image custom fields
Last modified: August 19, 2016

---

# Default image custom fields

 *  [makecg](https://wordpress.org/support/users/makecg/)
 * (@makecg)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/default-image-custom-fields/)
 * Trying to write some function that will place a default image if there isn’t 
   any Value in the custom fields for Thumbnail_URL name.
 * view my site here > [http://makecg.com/](http://makecg.com/)
 * Any ideas?

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/default-image-custom-fields/#post-1597311)
 * something like:
    (details depend on existing code)
 *     ```
       <?php $image = get_post_meta($post->ID,'Thumbnail_URL name',true);
       if( $image == '' ) { $image = 'default_image_url.jpg'; } ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Default image custom fields’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/default-image-custom-fields/#post-1597311)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
