The Events plugin for WordPress is a powerful tool designed to help users easily showcase and manage events on their websites. Whether you are hosting a concert, conference, workshop, or any other type of event, this plugin provides a comprehensive solution for displaying all relevant information to your audience.
Table Of Contents
With features such as customizable event titles, detailed descriptions, and essential event information (including date, time, venue, and platform), users can create attractive event listings that engage visitors. The plugin also supports additional functionalities like contact information, event galleries, FAQs, and more, making it an all-in-one solution for effective event promotion.
Imagine a local community center that hosts various events throughout the year, including art exhibitions, musical performances, and educational workshops. By using the Events plugin, the community center can create a dedicated events page on its WordPress website.
This use case highlights how the Events plugin can enhance user engagement and streamline event management for organizations of all sizes
This use case illustrates how the Events plugin can transform the way a community center engages with its audience, enhancing participation and fostering a sense of community through effective event management. By utilizing the plugin's capabilities, the center can create a vibrant online presence that attracts visitors and drives event attendance.
Step 01: First we have to go to the WordPress dashboard.
Step 02: Then we have to click the Plugins option from the dashboard. Then we have to click “Add New Plugin” button , from there we have to click “Upload Plugin”. Then we have to choose the plugin from our device. Then we have to click install button. Here we can Active The Plugin or we may active it later from Plugins options
Step 03: After activation we will see a new option called “Events” to our WordPress dashboard like below
Step 04: Clicking on Events we will few options like below
Step 05: Clicking on Add New we can add new an event like below
Step 06: After adding every thing if we publish it we will see it in preview page like below
Use our recommended page builder plugin, FancyPost to unlock a number of powerful blocks to help you to design amazing websites!
The Events plugin offers a variety of shortcodes that allow you to display events on your WordPress site easily. Shortcodes are simple codes that you can insert into your posts or pages to showcase event listings without any coding knowledge. Below are the available shortcodes and their functionalities:
Show Last 3 Events
To display the most recent three events on your website, use the following shortcode:
[events ppp="3"]
This shortcode retrieves and lists the last three upcoming events, providing visitors with a quick overview of what’s happening soon.
Show All Events with Pagination
If you want to display all events on your website, complete with pagination for easier navigation, use this shortcode:
[events ppp="-1"]
This will show all events available in the system, allowing users to browse through the entire event history without any limits.
Show Past Events
To specifically list past events, use the following shortcode:
[events ppp="-1" upcoming="false"]
This shortcode retrieves and displays all events that have already occurred, which can be useful for showcasing previous activities or providing context for future events.
Show Next Events
To highlight upcoming events, you can use this shortcode:
[events ppp="-1" upcoming="true"]
This shortcode will list all events that are yet to take place, giving visitors an opportunity to plan their attendance in advance.
To use these shortcodes, simply copy the desired shortcode and paste it into the WordPress editor where you want the events to appear. Make sure to preview your changes to confirm that the events are displayed correctly.
These shortcodes provide flexibility and ease of use, allowing you to tailor the event listings to suit your website’s needs and engage your audience effectively.
Click the button below to explore a live demo of the Events plugin. Experience how the plugin makes it easy to create and showcase events, complete with detailed descriptions, dates, times, venues, and other essential information. See how your events can be presented in an attractive and engaging way, helping you better understand the plugin's features and how it can enhance your website.
Ready to promote your events more effectively? Click the button below to download the Events plugin and start managing your events effortlessly. Whether you are planning concerts, workshops, or conferences, the plugin will help you create engaging event listings, complete with all the necessary details to attract your audience.
The Events plugin is designed with flexibility in mind, providing developers with various hooks and customization options to enhance functionality and integrate seamlessly with other systems. Below are some key areas where developers can customize and extend the plugin, along with codebase examples.
To add a custom field to the event post type, you can use the following code snippet. This example adds a custom field for "Event Organizer":
// Add custom field to Events post type
function add_event_organizer_meta_box() {
add_meta_box(
'event_organizer_meta_box', // ID
'Event Organizer', // Title
'event_organizer_callback', // Callback function
'events' // Post type
);
}
add_action('add_meta_boxes', 'add_event_organizer_meta_box');
function event_organizer_callback($post) {
$value = get_post_meta($post->ID, '_event_organizer', true);
echo '<label for="event_organizer">Organizer Name: </label>';
echo '<input type="text" id="event_organizer" name="event_organizer" value="' . esc_attr($value) . '" />';
}
function save_event_organizer_meta_box($post_id) {
if (array_key_exists('event_organizer', $_POST)) {
update_post_meta($post_id, '_event_organizer', sanitize_text_field($_POST['event_organizer']));
}
}
add_action('save_post', 'save_event_organizer_meta_box');
Developers can modify existing shortcodes or create new ones. Below is an example of a custom shortcode that displays upcoming events in a specific format:
// Custom shortcode for upcoming events
function upcoming_events_shortcode($atts) {
$atts = shortcode_atts(array(
'ppp' => '5', // Posts per page
), $atts, 'upcoming_events');
$args = array(
'post_type' => 'events',
'posts_per_page' => $atts['ppp'],
'meta_query' => array(
array(
'key' => 'event_date', // Assuming there's a custom field for event date
'value' => date('Y-m-d'), // Current date
'compare' => '>=', // Get events that are today or in the future
'type' => 'DATE',
),
),
);
$query = new WP_Query($args);
$output = '<ul>';
while ($query->have_posts()) {
$query->the_post();
$output .= '<li>' . get_the_title() . ' - ' . get_post_meta(get_the_ID(), '_event_date', true) . '</li>';
}
$output .= '</ul>';
wp_reset_postdata();
return $output;
}
add_shortcode('upcoming_events', 'upcoming_events_shortcode');
Here’s an example of how to use filters to modify the event query before it runs:
// Modify the event query to exclude specific categories
function exclude_event_categories($query) {
if (!is_admin() && $query->is_post_type_archive('events')) {
$query->set('tax_query', array(
array(
'taxonomy' => 'event_category', // Change to your taxonomy
'field' => 'slug',
'terms' => 'exclude-category', // The category to exclude
'operator' => 'NOT IN',
),
));
}
}
add_action('pre_get_posts', 'exclude_event_categories');
To create a custom template for the events page, you can copy the existing template file from the plugin folder to your theme folder and modify it as needed. For example, if the original template file is events-template.php
, you would copy it to your-theme/events-template.php
and make your changes there.
Here’s how to integrate the Events plugin with a calendar plugin using hooks:
// Sync events with a calendar plugin (example code)
function sync_events_with_calendar($event_id) {
$event_data = get_post($event_id);
// Code to integrate with the calendar plugin API
// e.g., sending event data to an external calendar service
}
add_action('save_post_events', 'sync_events_with_calendar');
To create a custom REST API endpoint for events, you can use the following code:
// Register custom REST API endpoint
function register_events_api() {
register_rest_route('events/v1', '/list', array(
'methods' => 'GET',
'callback' => 'get_events_list',
));
}
function get_events_list() {
$events = new WP_Query(array('post_type' => 'events', 'posts_per_page' => -1));
$data = array();
if ($events->have_posts()) {
while ($events->have_posts()) {
$events->the_post();
$data[] = array(
'title' => get_the_title(),
'date' => get_post_meta(get_the_ID(), '_event_date', true),
// Add more fields as needed
);
}
}
return rest_ensure_response($data);
}
add_action('rest_api_init', 'register_events_api');
Search, install and active the Duplicate Page plugin By mndpsingh287 like below to make copy of similar types of Event
We are always looking to improve! If you have any suggestions for new features or improvements to the plugin, feel free to reach out to us. Your feedback helps us make Easy Job Listing even better.(Contact form , Telegram, Whatsapp, Messenger)
If you enjoy using Events Plugin and would like to support its continued development, please consider making a donation. Your contributions will help us add more features, provide regular updates, and continue offering support to all users.