Cyber sale! 35% Off code: EVOCYBER24 Shop Now

ends midnight 12/2 PST

How To Allow Users to Submit Events and Create an Events Listing Page

Last Updated: August 31, 2023

You can allow site visitors to submit events to your site with the help of the Action User addon and also list their own events on an exclusive page on your site. This is crucial if you maintain one of the following website types:

  • Event directory website – Users can submit their own events for inclusion
  • Community website – Members can contribute events relevant to their interests
  • Non-profit and charity website – Volunteers can submit fundraising events and charity drives
  • Wedding and party planning website – Users can submit their celebrations and party events
  • Health and wellness website – Professionals can share workshops, seminars, and health-related events.
  • Niche interest communities – Members can submit events if your website caters to specific hobbies or interests (gardening, pet enthusiasts, technology meetups).

Installation

In order to get started, you will need to have EventON and the Action User addon installed and activated. You can get the EventON plugin by downloading it from your CodeCanyon account. Please follow our tutorial on how to install & activate EventON and how to install addons in case you need more details about the install process.

Setting Up Action User

Go to EventON > Settings > Action User > General Settings and enable the option to “Assign logged-in user to event after successful event submission” and “Allow only logged-in users to submit events” as shown below:

You can customize the fields that you want displayed by clicking on the Form Fields tab on the left menu.

Create your guest event submission page by going to your WordPress dashboard > Pages > Add New and add the page title.

If you are using the block editor, add the EventON block.

If you are using the Classic Editor, click on the EventON button on the menu bar to launch the Shortcode generator and select Action User – Event Submission Form as shown below:

Publish the page and the event submission will be visible on the front end of this page for site visitors to submit events as shown below:

Create an Events Listing Page

In this step, we’ll create a custom page on your WordPress site that will list all submitted events from guest users on your site. For this, we need to create a new custom page template on your theme.

To start, copy the page.php file of your theme and rename it to eventon-listing- template.php

Now, open this file and paste the following code to tell WordPress that you have added a new page template:

<?php
/**
* Template Name: EventON Events Page
*/
?>

Create an Events Listing page on your WordPress Admin page by going to WordPress > Pages > Add New.

Assign the template that we created in the previous step to this page from the side panel as shown below:

Next, copy the following code in the template:

<?php 
get_header();

the_title( '<h1 class="entry-title default-max-width">', '</h1>' ); ?>

<div class="entry-content">

<?php
$users = get_users( array( 'fields' => array( 'ID' ) ) );

foreach ( $users as $user ) :
  
    if(function_exists('add_eventon')){
    
      if(!empty($user->ID)){
      $user_info = get_userdata($user->ID);
      $author_profile_url = get_author_posts_url($user->ID); 
      echo '<div class="author-name"><a href="', $author_profile_url, '" class="contributor-link">', $user_info->display_name, '</a></div>';
      echo do_shortcode("[add_eventon users='".$user->ID."']");
      }
    }

endforeach;

?>
</div><!-- .entry-content -->

<?php get_footer(); ?>

This code will be responsible for dynamically looping through the users on your site and displaying them on the listing page.
PS: This code can be customized further to suit your site requirements.

Once the page is published, it will display a list of calendars with the user’s display name like so:

Did this article help you? If not, send us a ticket via helpdesk

Ready to setup your calendar?