Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter martinlhm

    (@martinlhm)

    Hi there, thanks for your reply.

    I am getting this error

    Table ‘welovecoventrywp.wp_em_locations’ doesn’t existTable ‘welovecoventrywp.wp_em_events’ doesn’t exist

    Also, where can i set the location_id to pull in a automatic location

    thanks
    Martin

    first, you need to install EM to make it work, is it already installed? also, where did you put the code?

    Thread Starter martinlhm

    (@martinlhm)

    Yes, i have EM installed, its populated manually at the moment.

    I pasted the code into functions.php, is that correct?

    maybe trying it as a plugin ? https://codex.wordpress.org/Writing_a_Plugin

    Thread Starter martinlhm

    (@martinlhm)

    Where can i set the location_id to pull in a automatic location?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    in wp_em_events table and also the corresponding post record in wp_postmeta with a key of _location_id

    This will be EXCELLENT when it works properly. Thanks @agelonwl for getting this jump-started.

    I just installed it on a test instance, at the root of the site. It did pull in the first three events from Trumba.com, but only after I changed the URL to a feed I actually want to bring in and reloaded the page. (perhaps it was just really slow to load.) The correct count of events (3) were pulled from both Trumba and my site, but things ended up in the wrong places:

    Start and End were set to 01/01/1970 on events from my feed. (Events from Trumba have the correct dates and times)
    The actual start/end date and time as well as the location name, location address, and location city are in the text body.

    The location did not already exist; it was a brand new install.

    If the location name does exist things work better for the Trumba feed. I still end up with the location name and the date/time in the text body, but at it does also have the description, and the location info is in the right place.

    If I pre-enter locations to match the feed that I wish to bring in (another EM site), most of it still breaks – Start and end date/time and some location info are in the text body, but there’s no match on location and the time date of the event are 01/01/1970. So I’m a little stumped.

    I’d like it to add a location if there’s no match, which will most likely be the case in my setup. Got pointers on how to pull the location data from an EM source and insert it into the target, with the result being the location ID so the rest of it will work?

    I’m assuming also that the x-trumba stuff in there is specific to the trumba site. How to tweak that for a generic EM install?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    I recommend you check out the get_post() and get_post_meta() functions of the EM_Location and EM_Event objects, because then you can do something similar to:

    $EM_Location = new EM_Location();
    //populate fields as get_post and get_post_meta does
    $EM_Location->save();

    That way, EM will handle all the odd places things get saved to.

    Thread Starter martinlhm

    (@martinlhm)

    Has anyone got any idea how to do this?

    Ideally the way I need it to work is:

    Automatically put in the Title of the Event, Date of the Event & Description.

    Manually set the Address in the function as all events are from the same venue.

    Is this possible?

    many thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Using an RSS feed to populate events’ is closed to new replies.