Querying posts by latitude and longitude to build a Google Maps with several markers

To connect your meta fields with the “Geo Data Store”-Plugin, you simply take the name of the meta key/field and map it with the filter to the plugin. add_filter( ‘sc_geodatastore_meta_keys’, ‘wpse82502_lat_lng_metakey_mapping’ ); function wpse82502_lat_lng_metakey_mapping( $keys ) { $keys[] = “your_meta_key_field_name”; return $keys; } To get the data from PHP to JS, simply use wp_localize_script().

How can i retrive a text from a custom field

I’m not certain what an empty get_field returns, as it’s from a plugin. However, assuming it provides FALSE or an empty string: <?php $data = get_field( ‘data_nasterii’ ); echo ( $data ? date( “d/m/Y”, strtotime( $data ) ) : ‘N/A’ ); ?>

Displaying custom filed content instead of post content

You just need to check for that custom field and return that instead of post content. function displayCustomContent() { if (!is_front_page()) return $content; // how to replace main post content with custom content ? global $post; $special_content = get_post_meta($post->ID,’page_builder’,true); if (!empty($special_content)) { // remove_all_filters(‘the_content’); return $special_content; } return $content; } The only other thing you … Read more