Viewing 15 replies - 1 through 15 (of 21 total)
  • 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'
    );

    Thread Starter vinmarc

    (@vinmarc)

    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' ); 
    
    ?>

    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' );
    ?>
    Thread Starter vinmarc

    (@vinmarc)

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

    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

    Thread Starter vinmarc

    (@vinmarc)

    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

    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

    Thread Starter vinmarc

    (@vinmarc)

    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

    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

    Thread Starter vinmarc

    (@vinmarc)

    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

    Hello,

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

    Thread Starter vinmarc

    (@vinmarc)

    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

    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

    Thread Starter vinmarc

    (@vinmarc)

    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

    Thread Starter vinmarc

    (@vinmarc)

    Then I noticed that my template I charge only

    <link href="https://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="https://localhost/wordpress/wp-content/plugins/basic-google-maps-placemarks/style.css?ver=1.10" rel="stylesheet">
    <script src="https://localhost/wordpress/wp-includes/js/jquery/jquery.js?ver=1.8.3" type="text/javascript">
    <link href="https://localhost/wordpress/xmlrpc.php?rsd" title="RSD" type="application/rsd+xml" rel="EditURI">
    <link href="https://localhost/wordpress/wp-includes/wlwmanifest.xml" type="application/wlwmanifest+xml" rel="wlwmanifest">
    <link href="https://localhost/wordpress/" title="home" rel="prev">
    <meta content="WordPress 3.5.1" name="generator">
    <link href="https://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?

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Problems’ is closed to new replies.