• Hi,

    I worked on a project few months ago and succeeded to display the location on the single post page as you can see the “Paris location” on this page https://lehubpedagogique.fr/materiels/livre-montessori/

    This week, i picked up the project and the location doesn’t show on the new posts i create.

    As you can see, i use the leaflet api.
    The php code i use is : get_post_meta($post->ID, ‘localisation’, true)

    Do you have any clue how to guide me to resolve the problem.

    Thank you and have a nice day.
    Leslie

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter lansili

    (@lansili)

    Hi,

    I’m sorry to bother you again but i’m still stuck with my issue.
    Would you have any clue to help me find a way out?

    Thanks a lot,
    Leslie

    Plugin Author Eyal Fitoussi

    (@ninjew)

    Hello @lansili,

    I apologize for not replying sooner.

    The custom field that you mentioned ( get_post_meta($post->ID, ‘localisation’, true) ) does not belong to GEO my WP. GEO my WP does not save its location data in custom fields. So you might be using an additional plugin or just use a custom solution that uses custom fields.

    Anyway, to display the city of GEO my WP’s location you can use the code below:

    
    $args = array(
        'fields' => array( 'city' ),
    );
    
    echo gmw_get_post_address( $args );

    `

    I hope this helps.

    • This reply was modified 4 years, 8 months ago by Eyal Fitoussi.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Display custom post localisation’ is closed to new replies.