Changing author of imported events; past events on My Events list

Home Forums Calendar Products Community Events Changing author of imported events; past events on My Events list

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #123389
    irishrunner16
    Participant

    I’ve imported a few thousand events to our site and we’ll need to change the author on them from the site admin to their respective user. Other than the post_author value in the _posts table, are there any other values in the database that would need to be updated so that the new user could edit their events (including the organizer & venue data) using the Edit an Event form they’d access from their My Events list?

    I noticed that the _postmeta table has the _EventOrigin meta value as “events-calendar” for events added via CSV Import, while events submitted via the Submit an Event form have “community-events” as their Event/Organizer/Venue Origin value. So wasn’t sure if those would have to be changed as well to ensure the new author could edit all event/org/venue info on the Edit an Event form.

    Also, is there a snippet that will allow past events to be shown on the My Events list (in addition to upcoming events)?

    Thanks in advance!
    Sean

    #123415
    Barry
    Member

    I think you should be good if you change the post_author field: the best thing to do is try it out with one event, confirm it behaves as expected (or not) and then take things from there.

    Also, is there a snippet that will allow past events to be shown on the My Events list (in addition to upcoming events)?

    You could try this and see how you get on 🙂

    #123534
    irishrunner16
    Participant

    Looks like post_author is the only field that needs to be changed, so I’m good there. And that snippet works too! I’m seeing past events in the list now 🙂
    Only thing is the list is displaying the older events last (newest to oldest). Since the columns of the My Event list can’t be sorted by the user, is there something else I could add to the snippet to sort the list by oldest to newest date?

    #123750
    Barry
    Member

    Hi!

    We’d need to leave it to you to figure out the rest here – though we’d love to help more it is ultimately a custom development that you’ll need to drive to completion by yourself. Beyond our own resources like the Themer’s Guide and technical docs you may find WordPress’s own WP Query documentation to be useful here (look out for the section on ordering query results).

    Thanks – and good luck 🙂

    #125978
    irishrunner16
    Participant

    Ok thanks Barry! Appreciate the help and thanks for pointing me in the right direction!

    #134962
    Barry
    Member

    Pleasure!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Changing author of imported events; past events on My Events list’ is closed to new replies.