Custom Fields
Re-Envisioned
Support General Open Street Map: View all post of one cpt

This topic contains 6 replies, has 2 voices, and was last updated by  proyectohappyweb@gmail.com 5 months, 3 weeks ago.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #14236

    Anh Tran
    Keymaster

    Hi Sergo,

    The Open Street Map field is per post. If you need to display all location of all posts on a same map, you might need to write custom code. I’ll make a tutorial about that later in the blog. Stay tuned.

    #14247

    oohh this would be fantastic!!!

    I know it exist the plugin of Leaflet:
    https://wordpress.org/plugins/leaflet-map/

    But I think if with your plugin I can do everything, it’s not worth installing the other one…

    I will be waiting for your article.

    Many thanks.

    #14775

    Hello, you finally wrote the tutorial?

    Thanks,
    Sergio

    #14783

    Anh Tran
    Keymaster

    Sorry for the delay, here you are.

    #14790

    Hello, many thanks!!

    Questions… I don’t want to use a new page to insert the map… I want to put the map in the top of each archive pages of each cpt.
    To do that:
    1.- I have to put his line in my archive page?

    2.- I have to update something in the wp_enqueue_script function in functions.php ?

    3.- I have to modify something in the list.js ?

    4.- I have to put the list.js in my js folder?
    In my theme is here: …/wp-content/themes/theme-name/assets/js/
    In functions.php I have to update this code?
    wp_enqueue_script( ‘list’, get_parent_theme_file_uri( ‘js/list.js’ ), [‘jquery’, ‘leaflet’], ‘1.0’, true );
    to
    wp_enqueue_script( ‘list’, get_parent_theme_file_uri( ‘js/assets/list.js’ ), [‘jquery’, ‘leaflet’], ‘1.0’, true );

    Many thanks for your help.
    Sergio

    #14799

    Oh, it works well for me, forget my previous message. Thank you!!

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.