Title: Google Maps code and Custom Fields
Last modified: August 21, 2016

---

# Google Maps code and Custom Fields

 *  [netbie](https://wordpress.org/support/users/netbie/)
 * (@netbie)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/google-maps-code-and-custom-fields/)
 * I have some post that have postal address in custom fields: address , city, state
   and zip. How can I put a Google Maps (php)code in the template using these custom
   fields ? Thanks very much in advance.

Viewing 1 replies (of 1 total)

 *  Thread Starter [netbie](https://wordpress.org/support/users/netbie/)
 * (@netbie)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/google-maps-code-and-custom-fields/#post-4728024)
 * Thank you, I have made some research and I have found it.
 * In my case:
 * <iframe width=”400″ height=”300″ frameborder=”0″ scrolling=”no” marginheight=”
   0″ marginwidth=”0″ src=”[https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=&lt](https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=&lt);?
   php if ( function_exists(‘get_custom_field_value’) ){
    get_custom_field_value(‘
   address’, true); } ?><?php foreach((get_the_category()) as $category) { echo 
   $category->cat_name . ‘ ‘; } ?><?php if ( function_exists(‘get_custom_field_value’)){
   get_custom_field_value(‘zip’, true); } ?> <?php if ( function_exists(‘get_custom_field_value’)){
   get_custom_field_value(‘state’, true); } ?>;t=m&z=14&iwloc=A&output=embed&iwloc
   =near”></iframe>

Viewing 1 replies (of 1 total)

The topic ‘Google Maps code and Custom Fields’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [netbie](https://wordpress.org/support/users/netbie/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/google-maps-code-and-custom-fields/#post-4728024)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
