• Resolved msevestre

    (@msevestre)


    Hi !

    plugin is fantastic.

    Generally, I post an article to inform that a new event has been added to our agenda to give it more visibility. Obviously, this creates double work when adding an event (event + article).

    Is there a way to have such an automatic “event added” notification article ? (should it be using a hook)

    Idea if to have a simple generic content:
    Title: “New event added: [event_title]”
    content: “a new event [event_title] has been added. You can find its detail in [event_url]”
    Image: same as event one

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    You can try to hook into em_event_save filter e.g. https://pastebin.com/qj3vTArq

    Thread Starter msevestre

    (@msevestre)

    Hi

    I actually played around during the weekend and managed to make it using the wordpress “transition_post_status” hook, filtering on 4 conditions (to map it with the admin event validation for publication):
    * post type is event
    * old status is “pending”
    * new status is “publish”
    * revision count = 0 (to ensure this automatically posted article is only done once)

    Not being a perfect solution as it works only for events submitted from frontend due to publication scheme not being the same when publishing from backend or front end:

    • frontend :
    • submission by user: new -> pending
    • validation by admin: pending -> publish, with revision count = 0
    • backend:
    • submission by user: draft -> pending
    • validation by admin: pending -> publish, with revision count = 1

    `

    So I got an issue as backend actual first publication has one revision at first post (!)…

    • This reply was modified 3 years, 12 months ago by msevestre.
    • This reply was modified 3 years, 12 months ago by msevestre.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Any way to trigger a post to inform an event has been added ?’ is closed to new replies.