Set "show google map" for a venue on "true" by default

Home Forums Calendar Products Events Calendar PRO Set "show google map" for a venue on "true" by default

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1277906
    Ralph
    Participant

    Hi,

    I want to import many new venues to my site by using csv import. By default the “show on Map” option is unchecked, but I want that it is checked by default.

    How could I do this? Any Ideas or fixes?

    Thanks a lot and best Regards
    Simon

    #1278883
    Andras
    Keymaster

    Hello Simon,

    I currently did a test import of a CSV file with Event Aggregator and the ‘Show Google Map’ and ‘Show Google Map Link’ options got checked for all imported venues.

    In case this doesn’t happen for you then you have 2 options.

    1. Do it manually for the venues. (Yeah, I know…)

    2. Do it manually in the database.

    Let me give you a bit more details on this second idea.

    When you import the venues from the CSV file they will be all added to the ‘wp_posts’ table in the database right after eachother with sequential ‘post_id’ values. You can get all venues with the following sql command:

    SELECT * FROM wp_posts WHERE post_type="tribe_venue" ORDER BY ID

    And then check what is the last consecutive batch of IDs. (I.e. 26091 to 26101)

    Then you will need to update some data in the the ‘wp_postmeta’ table to turn on the “show on Map”. The two meta_keys you are looking for are ‘_VenueShowMap’ and ‘_VenueShowMapLink’.

    These are automatically set to ‘no’, so you want to set them to ‘yes’. Here are the 2 sql commands to do that based on the above venue IDs.

    UPDATE wp_postmeta SET meta_value='yes' WHERE meta_key='_VenueShowMap' AND post_id>=26091 AND post_id<=26101

    and

    UPDATE wp_postmeta SET meta_value='yes' WHERE meta_key='_VenueShowMapLink' AND post_id>=26091 AND post_id<=26101

     

    Also make sure the the Events > Settings > General tab > Map Settings section > Enable Google Maps setting is checked.

    I hope this helps. Let me know if you need any more guidance.

    Cheers,
    Andras

    #1279051
    Ralph
    Participant

    Hi Andras,

    thanks al lot for your answer. You showed me two acceptable solutions. But maybe there is a better one?

    Another thought:
    I did not bought the Event Aggregator, so I am using the default csv import of the pro plugin. Maybe this is the problem/difference?

    Maybe you can send me your csv file?

    Thanks again!
    Simon

    #1279580
    Andras
    Keymaster

    Hey Simon,

    That indeed can be the source of the difference. Also note, that you don’t need an Event Aggregator license to import CSV files, that is part of the core. You only need a license if you want to import from other sources like Facebook, Meetup etc.

    I used the venue csv file from this page:
    https://theeventscalendar.com/knowledgebase/csv-files-options-and-examples/

    And this article might be useful as well, just in case:

    Importing Calendar Data From a CSV File

    I’d say give the Event Aggregator csv import a try, that might be the solution.

    Let me know how you end up.

    Cheers,
    Andras

    #1289902
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Set "show google map" for a venue on "true" by default’ is closed to new replies.