Show Google Maps link by default on Facebook Import?

Home Forums Calendar Products Event Aggregator Show Google Maps link by default on Facebook Import?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #958279
    Remco
    Participant

    Hello,

    is it possible to show the Google Maps link by default when importing Facebook Events?
    The event adress and map is showing well.
    Thank you.

    #958506
    George
    Participant

    Hey Remco,

    This is unfortunately not possible without customizing the core Facebook Events code directly. This is not recommended, and it’s a code change that will be erased when you auto-update the plugin in the future (so you’ll have to re-make this code edit after every edit), but you can fortunately do it very easily.

    All you have to do is look in the main Facebook Events importer plugin file and look for code that looks like this:

    
    // set the event's map status if global setting is enabled
    if( tribe_get_option('fb_enable_GoogleMaps') ) {
        update_post_meta( $event_id, '_EventShowMap', true );
    }
    

    You should find that somewhere between lines 720 and 770 of the main file, depending on your version of the plugin and such, but you can just do a search for ‘fb_enable_GoogleMaps’ and it should come up.

    To automatically set the Google Maps link as well, add another update_post_meta() call underneath the one in that code above, like this:

    
    // Set the event's map status if global setting is enabled
    if( tribe_get_option('fb_enable_GoogleMaps') ) {
        update_post_meta( $event_id, '_EventShowMap', true );
        update_post_meta( $event_id, '_EventShowMapLink', true );
    }
    

    Then, save the file and try importing – it should work fine for you!

    Let us know if this helps!

    George

    #984102
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Show Google Maps link by default on Facebook Import?’ is closed to new replies.