X
180541

Event Location Taxonomy and its Meta Field: in which wp table are they saved?

hi, in this eventon documentation page https://docs.myeventon.com/documentations/taxonomies-eventon/ it is affirmed that

“Location and organizer for events are saved as taxonomies in wordpress since eventon version 2.4. Meta data mentioned below for location and organizer are saved as term meta.”

but i can’t find nothing into wp_termmeta table, can you tell me where taxonomy meta field (address, lat, lon, link, image …) are stored? maybe in option table?

i ask this becouse i’m using wpallexport and i would like to export standard taxonomy field (name, slugm, description) and meta custom field (added by eventon).

regards

BY: Paolo Cocchiara - Jun 11,2020 AT 10:34AM - 3 years ago
    • Artem Jun 11,2020 AT 11:56AM - Posted 4 years ago - #180555

      Hey Paolo,

      $taxonomy = ‘event_location’;
      $event_terms = wp_get_post_terms($id[0], $taxonomy);
      if ( $event_terms && ! is_wp_error( $event_terms ) ){
      $event_location_term = $event_terms[0];
      $event_location_term_meta = evo_get_term_meta(‘event_location’,$event_terms[0]->term_id);
      $location_lon = $event_location_term_meta[‘location_lon’];
      $location_lat = $event_location_term_meta[‘location_lat’];
      $location_address = $event_location_term_meta[‘location_address’];
      $location_city = $event_location_term_meta[‘location_city’];
      $location_state = $event_location_term_meta[‘location_state’];
      $location_country = $event_location_term_meta[‘location_country’];
      $evcal_location_link = $event_location_term_meta[‘evcal_location_link’];
      $evo_loc_img = $event_location_term_meta[‘evo_loc_img’];
      }
    • Artem Jun 11,2020 AT 11:56AM - Posted 4 years ago - #180557

      I have posted for you an example of code, that can help you get the event terms related things.

       

      Let me know if u have further questions.

    • Artem Jun 18,2020 AT 11:56AM - Posted 4 years ago - #181918

      Location is a taxonomy you can find in wp_term_taxonomy: https://code.tutsplus.com/tutorials/understanding-and-working-with-taxonomies-and-terms-in-wordpress–cms-21051

    • Paolo Cocchiara Jun 24,2020 AT 7:50AM - Posted 4 years ago - #182726

      i know that location is a taxonomy but i ask to know more info about taxonomy meta field (address, lat, lon, link, image …) where are they stored? maybe in option table? wpallexport when analyze “lacation taxonomy” can find only standard and media field.

      i need to update 303 address location field that i have listed on a xlsx file:(

    • Artem Jun 24,2020 AT 12:56PM - Posted 4 years ago - #182784

      Terms must be located in the wp_terms table. Not sure why wpallexport cannot show them to you.

      Please contact wpallexport developers and ask about this issue. Unfortunately, we unable to help with third-party plugins.

    • Paolo Cocchiara Jun 25,2020 AT 1:39AM - Posted 4 years ago - #182820

      hi, in wp_terms i can find created terms for each taxonomy or custom taxonomy but here there aren’t custom field for the terms (what address for location is). i searched into wp_termmeta without results.

      This is why wpallimport/export can’t find them.

      so where do you save this information?

    • Paolo Cocchiara Jun 25,2020 AT 1:41AM - Posted 4 years ago - #182821

      from your doc: “Meta data mentioned below for location and organizer are saved as term meta.” but this information is misleading

    • Artem Jun 25,2020 AT 1:59AM - Posted 4 years ago - #182824

      Please check https://docs.myeventon.com/documentations/taxonomies-eventon/. As you can see it uses get_terms function which at the same time uses https://developer.wordpress.org/reference/classes/wp_term_query/. WP_TERM_QUERY uses “FROM $wpdb->terms” and “INNER JOIN $wpdb->term_taxonomy” in it’s SQL queries, so you need to check both terms and term_taxonomy tables.

    • Paolo Cocchiara Jun 25,2020 AT 3:44AM - Posted 4 years ago - #182880

      In my _termeta table there aren’t evo term meta data.

      Finally i found that meta field for location taxonomy terms” are stored in option table as a serialized row (see  attachment).

      so can you explain me why is this happening?

    • Artem Jun 26,2020 AT 3:25AM - Posted 4 years ago - #183065

      It seems that you are correct. In this ticket other customer points out that related term meta is stored in wp_options: https://helpdesk.ashanjay.com/ticket/event-location-and-organizer-taxonomy-meta-not-migrating-between-installs/.

    • Paolo Cocchiara Jun 26,2020 AT 8:42AM - Posted 4 years ago - #183117

      now i have csv file with three columns: id, slug term and address field. How can i import into eventon?

    • Artem Jun 26,2020 AT 1:49PM - Posted 4 years ago - #183155

      Why are you trying to do this custom importing? Why not you use the sample CSV eventon provides?

    • Paolo Cocchiara Jun 29,2020 AT 9:46AM - Posted 4 years ago - #183492

      hi, i need to update location’s address field and i haven’t import new events (if you refer to this tool https://www.myeventon.com/addons/csv-event-importer/)

    • Artem Jun 30,2020 AT 3:15AM - Posted 4 years ago - #183693

      now i have csv file with three columns: id, slug term and address field. How can i import into eventon?

      Please follow this guide: https://docs.myeventon.com/documentations/import-additional-fields-using-hooks/

    • Paolo Cocchiara Jun 30,2020 AT 7:33AM - Posted 4 years ago - #183721

      thanks, i think that your tool is for import only events. now i haven’t one event for each location so my problems remain: i would like to import only location and location_address.

      More i have to buy another tool and the only way to use it is create one demo event for each location and then delete them after import.

       

       

      document.oncontextmenu=null;document.onselectstart=null;document.ondragstart=null;document.onmousedown=null;document.body.oncontextmenu=null;document.body.onselectstart=null;document.body.ondragstart=null;document.body.onmousedown=null;document.body.oncut=null;document.body.oncopy=null;document.body.onpaste=null;

    • Paolo Cocchiara Jun 30,2020 AT 10:10AM - Posted 4 years ago - #183752

      I update all location address with this php snippet from my function php files:

      https://pastebin.com/sB1BSq7b

    • Artem Jun 30,2020 AT 1:26PM - Posted 4 years ago - #183792

      Nice work Paolo 🙂

    • Paolo Cocchiara Jul 1,2020 AT 9:54AM - Posted 4 years ago - #183937

       

      document.oncontextmenu=null;document.onselectstart=null;document.ondragstart=null;document.onmousedown=null;document.body.oncontextmenu=null;document.body.onselectstart=null;document.body.ondragstart=null;document.body.onmousedown=null;document.body.oncut=null;document.body.oncopy=null;document.body.onpaste=null;

    • Paolo Cocchiara Jul 1,2020 AT 10:02AM - Posted 4 years ago - #183939

      sorry for my last message. thank for support:)

    • Artem Jul 1,2020 AT 1:47PM - Posted 4 years ago - #183984

      Thank you very much for sharing your solution with us! If you have any further questions or concerns please create a new ticket.

    • Paolo Cocchiara Oct 11,2021 AT 8:34AM - Posted 3 years ago - #254382

      hi, i see that there’s a new version, 1.1.2. With this new version  are been issues fixed?

    • Artem Oct 11,2021 AT 10:33AM - Posted 3 years ago - #254422

      Yes they are.

      If you still have any problem, let us know.

    • Paolo Cocchiara Oct 14,2021 AT 8:55AM - Posted 3 years ago - #255151

      Great. Thanks

    • Artem Oct 14,2021 AT 11:41AM - Posted 3 years ago - #255189

      You are welcome!

You must login to reply to this ticket

HelpDesk

Welcome to EventON helpdesk.

EventON is the #1 Best selling event calendar plugin for WordPress websites in envato marketplace.

Checkout EventON