Custom Field for Location Name?
-
What is the custom field key for location name? I’m using wp-all-import plugin to import my events using XML feed.
In that plugin everything is showed on custom fields i.e _location_address, _location_town, _event_start_date…etc but I think on events manager plugin there is no custom key for location name.
I tried to find something on phpmyadmin but didn’t find anything for location name on wp_postmeta but find only _location_id I just want to samething like this for location name?
and I also I tried to find the locaion name using Custom Field Finder
plugin but didn’t come with key.Thanks!
-
another things is to try to use _location_id then match it against EM_Locations:get(array(‘location’=>1)) – http://wordpress.org/support/topic/wp_query-for-events-with-favorite-city?replies=15
I understand it but this should be used within pages/posts i.e on index or page php files, according to the array above it will match the location id 1 but I just want to import events via xml. I’m using wpallimport plugin.
While importing my events I just want to import all my locations so while importing there is no custom location name key and custom key is not available for location name and also event name/title instead of it contains _id
Check out my screenshot http://oi40.tinypic.com/a44s5e.jpg
it displays all the custom keys expect location name but how do I import locaion names? so id’s will create automatically.
if you can code maybe you can try this snippet which is shared by another user – http://pastebin.com/3UDjZ8Le
Code makes sense but where do I need to use this code? within sql database?
I’m not well expect on coding.
here you may find // if we have location, try to either retrieve it by name, or create a new location object
I just simply need to create a new location object while importing events from xml feed.
FYI: I’m using wpallimport plugin for importing events via xml.
The code Angelo linked to is meant to be run as a separate PHP psge.
In the code that you linked to, it’s lines 204 to 214 that deal with creating a new location.
in a nutshell, importing plugins won’t work with EM due to how certain information is stored in our own db tables.
Thanks for your reply Marcus!
Is there any ways I want to import XML feed and want to setup cron jobs? I’ve thousands of events that I don’t want to add one by one and also I’ve various xml feed from third party resources so only I tried wpallimport plugin but only one thing is missed here i.e location name.
Really stuck on here for last few days.
if you can code maybe you can try to create a new plugin and then use my snippet above – http://codex.wordpress.org/Writing_a_Plugin
In this code you sent http://pastebin.com/3UDjZ8Le if there is no location it will not create a new location while importing feeds.
unfortunately there’s not much more we can do to help you atm.
you’ll need to look at that snippet and adjust accordingly. You may also find this thread helpful – http://wordpress.org/support/topic/bulk-csv-import-mass-upload?replies=8#post-4473316
it contains two CSV import plugins for EM submitted by other users.
The topic ‘Custom Field for Location Name?’ is closed to new replies.