Template Override
Override default plugin templates in your theme to customize the look and feel of event pages, ticket designs, and social sharing.
Override Event Templates
You can customize the default design or content of event templates by overriding them in your theme. This ensures your changes are preserved through plugin updates.
Steps to Override Templates
- Create a folder named
mage-eventsin your theme folder. - Inside it, create a subfolder named
single. - Copy the template file from
plugins/mage-eventpress/templates(e.g.location_list.php). - Paste it into
theme-folder/mage-events/single/. - Edit the file to make your changes. The plugin will load your version instead of the default.
Create Custom Theme/Template
The plugin is fully developer-friendly. You can create custom themes similar to WooCommerce templating.
Steps to Create a New Theme
- Copy
mage-eventpress/templates/folder to your theme and rename it tomage-events. - Create a new PHP file in
theme-folder/mage-events/themes/(e.g.dhaka.php). - Add a template name at the top:
<?php // Template Name: Dhaka - Your theme will now appear in the event page template list.
Available Hooks for Custom Themes
Call these action hooks inside your custom event template to print event values. Pass the event ID as the first argument:
do_action( 'mep_event_location_city', $event_id );
mep_event_date— Outputs the event date with time. Accepts$event_id.mep_add_to_cart— Outputs the registration section with ticket types, extra services and the cart button. Accepts$event_id,$event_infos.mep_event_map— Outputs the event location map. Accepts$event_id,$event_infos.mep_event_location— Outputs the event location as an address. Accepts$event_id,$event_infos.mep_event_location_street— Outputs the street part of the event address. Accepts$event_id.mep_event_location_city— Outputs the city part of the event address. Accepts$event_id.mep_event_location_state— Outputs the state part of the event address. Accepts$event_id.mep_event_location_postcode— Outputs the postcode part of the event address. Accepts$event_id.mep_event_location_country— Outputs the country part of the event address. Accepts$event_id.mep_event_social_share— Outputs the social share buttons. Accepts$event_id,$event_infos.
The section hooks used by the default event page (for example mpwem_title, mpwem_registration) are listed on the Hooks page.
Create Custom PDF Ticket Design
Design your own PDF ticket template for registered attendees.
Steps to Create PDF Theme
- Copy
woocommerce-event-manager-pdf-ticket/templates/pdf-themefrom the PDF Addon plugin. - Paste it into your theme folder and rename to
mage-events-pdf-themes. - Create a new PHP file with a template name:
<?php // Template Name: Your Theme - Design your ticket HTML. Note: some CSS attributes have limitations for PDF generation.
Available PDF Hooks
Call these action hooks inside your PDF theme file to print ticket values:
mep_pdf_logo— Show PDF logo set in PDF settings page.mep_pdf_company_address— Show company address.mep_pdf_company_phone— Show company phone number.mep_pdf_event_name— Show registered event name.mep_pdf_org_name— Show event organizer name.mep_pdf_start_date— Show event start date.mep_pdf_start_time— Show event start time.mep_pdf_attendee_info— Show attendee info given during registration.mep_pdf_event_location— Show event location.mep_qr_code— Display QR code. Pass the permalink as argument:do_action('mep_qr_code', get_the_permalink()).mep_pdf_event_order_id— Show order ID.mep_pdf_event_ticket_no— Show ticket number.mep_pdf_event_ticket_price— Show ticket price.mep_pdf_event_ticket_type— Show ticket type.mep_pdf_event_ticket_term_title— Show terms text title.mep_pdf_event_ticket_term_text— Show terms text.
Override Social Share Icons
Customize or add new social share icons to the share button template.
Steps to Override Share Icons
- Create a folder named
mage-eventsin your theme folder. - Inside it, create a subfolder named
single. - Copy
share_btn.phpfromplugins/mage-eventpress/templates. - Paste it into
theme-folder/mage-events/single/. - Edit the file to add or change share buttons as needed.
Override Category/Organizer Pages
Customize the category or organizer list page templates.
Steps to Override
- Create a folder named
mage-eventsin your theme folder. - Copy
taxonomy-category.phportaxonomy-organizer.phpfromwp-content/plugins/mage-eventpress/templates. - Paste it into
theme-folder/mage-events/. - Edit the template file to change the layout or styling.
Example: Change Grid to List
Change line 17 in taxonomy-category.php:
From:
do_action('mep_event_list_shortcode', get_the_id(), 'three_column', 'grid');
To:
do_action('mep_event_list_shortcode', get_the_id(), 'one_column', 'list');
