Title: Adding events through shortcode or programming
Last modified: August 30, 2016

---

# Adding events through shortcode or programming

 *  [mfrie01](https://wordpress.org/support/users/mfrie01/)
 * (@mfrie01)
 * [11 years ago](https://wordpress.org/support/topic/adding-events-through-shortcode-or-programming/)
 * I’m moving a Joomla! site over to WordPress and My Calendar is perfect for duplicating
   the previous functionality. I bought the User’s Guide hoping I’d find a shortcode
   allowing me to insert a new event, but find none. As in the previous system, 
   there are forms for authorized users to schedule various events. The forms handle
   all restrictions and date ranges, etc. so I can’t just offer up the calendar 
   for event entry. In Joomla! I was inserting records into iCalPro to get them 
   in the calendar. Should I just do the same, or do you have a more ‘controlled’
   way of programmatically adding events?
 * [https://wordpress.org/plugins/my-calendar/](https://wordpress.org/plugins/my-calendar/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [11 years ago](https://wordpress.org/support/topic/adding-events-through-shortcode-or-programming/#post-6196587)
 * I’m not sure what you mean by a shortcode that allows you to insert a new event;
   do you mean that you want a form to add events on the front-end of the site? 
   If so, that’s a premium add-on available from [https://www.joedolson.com/my-calendar/submissions/](https://www.joedolson.com/my-calendar/submissions/)
 * If you mean something else, I’m not sure I’m understanding.
 *  Thread Starter [mfrie01](https://wordpress.org/support/users/mfrie01/)
 * (@mfrie01)
 * [11 years ago](https://wordpress.org/support/topic/adding-events-through-shortcode-or-programming/#post-6196592)
 * You have a function to save a new event, my_calendar_save(), which accepts an
   array with the event data to be or updated. This is called by edit_my_calendar()
   which validates and formats the data from the $_POST to prepare it for the save.
   I want to pass an array of my data to your program to programmatically add a 
   new event. A shortcode that collected the passed attributes and then called something
   like edit_my_calendar() would substitute my array for the $_POST array and allow
   me to add or edit events: [my_calendar_edit mode=’add’ event=$myarray]. Without
   access to your functions what I’ll do is just stuff my data into your tables 
   with my own add/update functionality. It will work fine that way, but I thought
   you might have something already available.
 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [11 years ago](https://wordpress.org/support/topic/adding-events-through-shortcode-or-programming/#post-6196718)
 * I may be totally misunderstanding what you’re trying to do, but it seems to me
   like the method you’re describing would be vastly more work than calling the 
   check and insert functions themselves; those are `mc_check_data` and `my_calendar_save`

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding events through shortcode or programming’ is closed to new replies.

 * ![](https://ps.w.org/my-calendar/assets/icon-256x256.png?rev=1097576)
 * [My Calendar - Accessible Event Manager](https://wordpress.org/plugins/my-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/my-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-calendar/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/adding-events-through-shortcode-or-programming/#post-6196718)
 * Status: not resolved