WordPress.org

Support

Support » Plugins and Hacks » Basic Google Maps Placemarks » [Resolved] [Plugin: Basic Google Maps Placemarks] Single placemark on maps and functions.php question

[Resolved] [Plugin: Basic Google Maps Placemarks] Single placemark on maps and functions.php question

  • Hello

    I really enjoy the plugin but I can’t find a way to simplify displaying single placemarks on individual maps.

    I have ca. 500 placemarks grouped into 6 categories + 1 common category to display them all on a single map.

    But I also need to display separate maps with each placemark as a single spot on those maps. It does not make a sense to create ca. 500 separate categories for each placemark to chose from – especially that the list will grow…

    Same issue bothers me with updating functions.php with each single post slug. Each placemark has its own dedicated post with individual map. Now, to display them, I need to add each post slug into functions.php and the list is loooooooong.

    Is there a way to simplify this and making more convenient in use?

    Greetings and thanks for the plugin!

    http://wordpress.org/extend/plugins/basic-google-maps-placemarks/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ian Dunn

    @iandunn

    If you edit a placemark, and click on the ‘View Placemark’ button at the top, you’ll see that WordPress already generates a page for each individual marker.

    If you create a template in your theme for those pages, you can add the map shortcode to it so that the map shows up:

    <?php echo do_shortcode( '[bgmp-map]' ); ?>

    Check the Template Hierarchy page on the Codex to figure out what the template’s filename should be. You can copy your single.php as a starting point.

    Then, to get it to only show the current marker, add a callback function for the bgmp_get-map-placemarks-query filter to a functionality plugin or your theme’s functions.php, and set the p field to the current post’s ID, which you can get using get_the_ID().

    Thanks for quick reply. Unfortunately I’m not a php programmer and this is far beyond my ability to implement it 🙁 Can you show any code examples?

    Plugin Author Ian Dunn

    @iandunn

    1.9.3-rc2 is now available, which adds support for this.

    [bgmp-map placemark="105"]
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Basic Google Maps Placemarks] Single placemark on maps and functions.php question’ is closed to new replies.
Skip to toolbar