• Hi,
    Thanks in advance for any help you will provide. I am not an English speaker so i wil try to explain you the best i can what issues i am facing actually.

    On my website i’d like to add in some pages (i want to decide which) a map that all the members of my website could “customize”. By customize i mean that i want them to add placemarkers with a description and even personal pictures on the map. And i want all these placemarkers to be shown so that when you look at the global map you can see all the places that my members recommend to other members.

    If i understood well what is in the plugin’s description, it seems that for reaching my goals i need to create a functionality plugin. So i have done like this. Gone to my PHP folder –> wp content –> plugins –> create a new folder called “carte-interactive-google” –> create a php file called “carte-interactive-google”. And this is what i enter in this file:

    <?php
    /*
    Plugin Name: Carte interactive Google
    Plugin URI: https://alternative-diving.club
    Description: Carte interactive Google permettant à chaque membre de pouvoir notifier lui-même des lieux qu’il apprécie.
    Version: 1.0
    Author: DLS
    */

    function bgmpShortcodeCalled()
    {
    global $post;

    $shortcodePageSlugs = array(
    ‘les-sites’,
    ‘second-page-slug’
    );

    if( $post )
    if( in_array( $post->post_name, $shortcodePageSlugs ) )
    add_filter( ‘bgmp_map-shortcode-called’, ‘__return_true’ );
    }
    add_action( ‘wp’, ‘bgmpShortcodeCalled’ );
    Then i activated the plugin in my plugin library.

    Now when i look at the page in which i want to show up this interactive map for my members it seems that it doesn’t work. The instructions provided are “Copy and paste that into your theme’s functions.php file or a functionality plugin, update the function names and filter arguments, and then add the slugs of any pages/posts containing the map to $shortcodePageSlugs.” And i think that i haven’t understood this page. So can you help me ? Cause i don’t understand what needs to be changed in that code and by which words.

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

  • The topic ‘problem while creating a functionality plugin’ is closed to new replies.