Last updated: 2 years ago

Using actionUser addon you can assign users to events. How to assign users to events.

If you also use the actionUser front-end submission form, you can set via settings so the registered user who create the event will get assigned to the event he created.

ActionUser > Event Submission Form > Assign logged-in user to event after successful event submission.

Once you have done this you can use the below code to create a calendar that will only show the events that are assigned to current logged-in user (of your site).

 

[code]

<?php

if(function_exists(‘add_eventon’)){
$user_ID = get_current_user_id();
if(!empty($user_ID)){
echo do_shortcode(“[add_eventon users='”.$user_ID.”‘]”);
}
}

?>

[/code]

You can place this PHP code inside a php file in your theme template where ever you need this calendar to show.

 

Method #2:

Since ActionUser v1.8 you can do this with the below shortcode

[code][add_eventon currentuser=”yes” ][/code]

That will show events only from the current loggedin user. However this shortcode will show all the events if the user is not logged in.

Ready to setup your calendar?

Buy EventON Now