Support » Plugin: Pronamic Google Maps » [Plugin: Pronamic Google Maps] How to display the address field within post content

  • Resolved Nancy

    (@dotdabbledorg)


    Hi,
    Love the plugin! I’m sure this is something easy I’m just missing, but how do I display the Address field *text* within the content of my post. I figured out how to display the map, but I need to display the text of the address (and possibly the description) as well.

    Thank you!

    http://wordpress.org/extend/plugins/pronamic-google-maps/

Viewing 2 replies - 1 through 2 (of 2 total)
  • missymooreuk

    (@missymooreuk)

    Hi

    I would also like to know how to output the address field in a post.

    Thanks

    Rachel

    Plugin Author Remco Tolsma

    (@remcotolsma)

    There is not an shortcode for that, but you append the address with an function to the_content() of an post:

    function prefix_the_content($content) {
    	$address = get_post_meta(get_the_ID(), '_pronamic_google_maps_address', true);
    
    	if(!empty($address)) {
    		$content .= wpautop($address);
    	}
    
    	return $content;
    }
    
    add_filter('the_content', 'prefix_the_content');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Pronamic Google Maps] How to display the address field within post content’ is closed to new replies.