WordPress.org

Ready to get started?Download WordPress

Forums

Basic Google Maps Placemarks
Problems (22 posts)

  1. vinmarc
    Member
    Posted 10 months ago #

    Hello to all
    I have a little problem with this plugin, I can not want to see this map in my sidebar.

    As you can see in my site http://www.dasitalia.com/news/, I do not load the Javascript and CSS files, I can not understand why.

    Use the map through do_shortcode (), but I did not return any results.
    I also added in functions.php the function described.

    Can you help me?
    thanks

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

  2. FranceImage
    Member
    Posted 10 months ago #

    Hello,

    when you copied the code snippet to functions.php, have you also updated the $shortcodePagesSlugs so that it contains 'news' which the slug of your page ?

    Like so

    $shortcodePageSlugs = array(
            'news'
    );
  3. vinmarc
    Member
    Posted 10 months ago #

    I did everything ....
    Via also enclose the code entered in functions.php

    <?php
    function bgmpShortcodeCalled()
    {
        global $post;
    
        $shortcodePageSlugs = array(
            'news'
        );
    
        if( $post )
            if( in_array( $post->post_name, $shortcodePageSlugs ) )
                add_filter( 'bgmp_map-shortcode-called', '__return_true' );
    }
    add_action( 'news', 'bgmpShortcodeCalled' ); 
    
    ?>
  4. FranceImage
    Member
    Posted 10 months ago #

    Hi,

    In your code you put

    add_action( 'news', 'bgmpShortcodeCalled' );

    when it should be

    add_action( 'wp', 'bgmpShortcodeCalled' );

    However if your news page is not a post, I think it won't work anyway.
    You should try with

    <?php
    function bgmpShortcodeCalled()
    {
      if(is_home()) {
        add_filter( 'bgmp_map-shortcode-called', '__return_true' );
      }
    }
    add_action( 'wp', 'bgmpShortcodeCalled' );
    ?>
  5. vinmarc
    Member
    Posted 10 months ago #

    I put this in my sidebar
    <?php do_shortcode ( '[bgmp-map categories="das"]' ); ?>
    do you think so does not work?

  6. FranceImage
    Member
    Posted 10 months ago #

    Does it work when you put [bgmp-map categories="das"] it in a post ?

    Anyway, can you describe what you are trying to achieve ... may be I could find a more direct way

    Cheers

  7. vinmarc
    Member
    Posted 10 months ago #

    I tried to display the map in a post ....

    went on the banner error but remains the preload and you do not see the map ...

    My intent is to display a google map with the locations dell'azzienda, and I would like to see in my Sidebar.

    thanks

  8. FranceImage
    Member
    Posted 10 months ago #

    Yes I see the problem on your page ... for some reason it does not load the googlemap api javascript :(

    For your purpose, I think MapPress could be a better choice.

    I wrote a quick presentation here if you are not familiar with this plugin

    I hope this will help

  9. vinmarc
    Member
    Posted 10 months ago #

    Honestly, it's a nice plugin but it is not what I need.
    I'm looking for a plugin that enables the user to add their own work sites around the world.

    The prmo Plugin gave me the opportunity to do all of the above.
    You can not tell me why I do not work?

    thanks

  10. FranceImage
    Member
    Posted 10 months ago #

    ah sorry I misunderstood your needs

    For your immediate problem: your page is not loading googlemap script ... this may be due to your theme (I don't have the problem with default theme twentytwelve). I think you should switch to twentytwelve to make sure.

    What is prmo Plugin ?

    If I understand well, the user is a WordPress author in your site and is logging in to create a Placemark ... is it the way you plan it ?

    Cheers

  11. vinmarc
    Member
    Posted 10 months ago #

    I'm sorry, I explained bad ....
    A friend of mine asked me to create a website .... I thought I'd create it in wordpress ...
    Then he asked me to see, in the sidebar, a map which displays all its offices.
    These sites need to be updated, whenever my friend opens a new office in around Europe.

    So I installed this plugin
    thanks

  12. FranceImage
    Member
    Posted 10 months ago #

    Hello,

    did you try to switch to twentytwelve to see if your theme is responsible for not loading googlemap api ?

  13. vinmarc
    Member
    Posted 10 months ago #

    Now I can not try the plugin in the theme twentytwelve because the site is online.
    But I have made ​​a step forward .... I'm successful to be loaded at least JS but I can not see the map, it remains in the loop preload ....

    Do you know what can I do? Do you have other tips?

    thanks

  14. FranceImage
    Member
    Posted 10 months ago #

    You definitely have something weird on your javascript loading

    What I can say for sure is that:
    - this plugin should load 2 javascript (maps.google.com/maps/api/js and functions.js) and it does not ... so it's not surprising no map is displayed.
    - your page loads jquery twice ... strange

    You will have to turn all plugins off and activate them one at a time.
    Don't you have a local copy of the site to make tests on ? it's essential

  15. vinmarc
    Member
    Posted 10 months ago #

    I tried the Plugin locally with the theme Twenty Eleven and it works but with my no ....

    I tried locally with my theme eliminating all links to plugins and jquery and leaving only <? Php wp_head ();?> But does not work ....

    Where do you think I'm wrong?
    Thanks

  16. vinmarc
    Member
    Posted 10 months ago #

    Then I noticed that my template I charge only

    <link href="http://localhost/wordpress/?feed=rss2&page_id=284" title="test » Sedi Feed dei commenti" type="application/rss+xml" rel="alternate">
    <link id="bgmp_style-css" media="all" type="text/css" href="http://localhost/wordpress/wp-content/plugins/basic-google-maps-placemarks/style.css?ver=1.10" rel="stylesheet">
    <script src="http://localhost/wordpress/wp-includes/js/jquery/jquery.js?ver=1.8.3" type="text/javascript">
    <link href="http://localhost/wordpress/xmlrpc.php?rsd" title="RSD" type="application/rsd+xml" rel="EditURI">
    <link href="http://localhost/wordpress/wp-includes/wlwmanifest.xml" type="application/wlwmanifest+xml" rel="wlwmanifest">
    <link href="http://localhost/wordpress/" title="home" rel="prev">
    <meta content="WordPress 3.5.1" name="generator">
    <link href="http://localhost/wordpress/?page_id=284" rel="canonical">
    <meta content="initial-scale=1.0, user-scalable=no" name="viewport">
    <style type="text/css">

    I can not find functions.js, you think I can force it in any way?

  17. FranceImage
    Member
    Posted 10 months ago #

    So, it seems there may be something wrong with your theme.

    Can you try another map plugin with your theme on a local installation ?
    (MapPress or geo-mashup for example)

    That would tell us if there is a bug with Basic Google Maps Placemarks

  18. vinmarc
    Member
    Posted 10 months ago #

    I do not understand what should I expect with this plugin ....
    I installed it I have configured. What do I see?

  19. FranceImage
    Member
    Posted 10 months ago #

    Do you mean you don't figure out how to use MapPress ?

    I think we are getting lost here ...

    My point is: your theme seems to be responsible for your problem.

    To confirm it, I would try other plugins on a local installation (first with the default theme twentytwelve and then with your das theme)

  20. vinmarc
    Member
    Posted 10 months ago #

    good morning
    I tried the suggested plugin and it works, both with the default themes with both my ...

  21. FranceImage
    Member
    Posted 10 months ago #

    Hello,

    So there is an incompatibility between your theme and this plugin...

    A last thing you can try: in the core.php file line 38 you could try replacing 'wp' with 'wp_enqueue_scripts' in the action (as the comment suggests).

  22. vinmarc
    Member
    Posted 10 months ago #

    Even with this change, I do not work ....
    I do not know what to do ...

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.