Skip to content
No results
MEC Knowledgebase
  • Installation
    • Installation
    • Activation
    • Auto Update
    • Manual Update
    • Change License Domain
  • Settings
    • General
    • Archive Page
    • Slugs/Permalinks
    • Currency
    • View All
  • Single Event
    • Single Event Settings
    • How to Add Event In MEC Plugin?
    • MEC Single Sidebar
    • Custom Fields
    • View All
  • Event Modules
    • Speakers
    • Organizers
    • Locations
    • Map
    • View All
  • Booking Settings
    • Booking Module
    • Booking Elements
    • Booking Form
    • Payment Gateways
    • View All
  • Event Submission
    • General
    • Access Level
    • FES Sections
    • Required Fields
    • View All
  • Integrations
    • Mailchimp
    • Paid Memberships Pro
    • BuddyPress
    • LearnDash
    • View All
  • Notifications
    • Booking Notification
    • Booking Confirmation
    • Booking Reminder
    • Admin Notification
    • View All
  • Addons
    • Elementor Single Builder Addon
    • Ticket and Invoice Addon
    • Event Seat Addon
    • Virtual Events Addon
    • View All
  • Other
    • Appearance Settings
    • Translation
    • Knowledge
    • Troubleshooting
    • Developer
MEC Knowledgebase

  • Categories
    • Installation
      • Installation
      • Activation
      • Auto Update
      • Manual Update
      • Change License Domain
    • General Settings
      • General
      • Archive Pages
      • Slugs/Permalinks
      • Currency
      • View All
    • Single Event
      • Single Event Settings
      • MEC Single Sidebar
      • How to Add Event In MEC Plugin?
      • Custom Fields
      • View All
    • Event Modules
      • Speakers
      • Organizers
      • Locations
      • Map
      • View All
    • Booking Settings
      • Booking Module
      • Add a Booking System
      • Booking Form
      • Organizer Payment Settings
      • View All
    • Event Submission
      • General
      • Access Level
      • FES Sections
      • Required Fields
      • View All
    • MEC Integrations
      • Mailchimp
      • BuddyPress
      • LearnDash
      • Paid Memberships Pro
      • View All
    • Notifications
      • Booking Notification
      • Booking Confirmation
      • Booking Reminder
      • Admin Notification
      • View All
    • Addons
      • Elementor Single Builder Addon
      • Ticket and Invoice Addon
      • Event Seat Addon
      • Virtual Events Addon
      • View All
    • Other
      • Appearance Settings
      • Translation
      • Knowledge
      • Troubleshooting
      • Developer

Submit a Ticket
MEC Knowledgebase

Toggle
  • Category Taxonomy MEC Hooks
  •  Single page
  • Archive
  • Shortcode Hooks
  • A few examples
    • MEC single page
    • MEC archive page

Developer

MEC Hooks

You can find all of the MEC Hooks action and filter hooks for interacting with another piece of code in the following list:

Category Taxonomy MEC Hooks

templates/taxonomy-mec-category.php

do_action('mec_before_main_content'); 

do_action('mec_before_events_loop'); 

do_action('mec_after_events_loop'); 

do_action('mec_after_main_content');

 Single page

templates/single-mec-events.php

do_action('mec_before_main_content');

do_action('mec_after_main_content');

Archive

templates/archive-mec-events.php

do_action('mec_before_main_content'); 

do_action('mec_before_events_loop');

do_action('mec_after_events_loop'); 

do_action('mec_after_main_content');

Shortcode Hooks

do_action('mec_agenda_skin_head'); 

do_action('mec_available_spot_skin_head');

do_action('mec_carousel_skin_head');

do_action('mec_countdown_skin_head');

do_action('mec_cover_skin_head');

do_action('mec_daily_skin_head');

do_action('mec_full_skin_head');

do_action('mec_grid_skin_head');

do_action('mec_list_skin_head');

do_action('mec_map_skin_head');

do_action('mec_masonry_skin_head');

do_action('mec_monthly_skin_head');

do_action('mec_slider_skin_head');

do_action('mec_timetable_skin_head');

do_action('mec_weekly_skin_head');

 do_action('mec_yearly_skin_head');

A few examples

MEC single page

function single_mec_before_main_content() {
        if ( is_singular( 'mec-events' ) ) {
        echo '<div><h3>single event page</h3></div>';
    }
}
add_action('mec_before_main_content','single_mec_before_main_content');

MEC archive page

function archive_mec_before_main_content() {
        if ( is_post_type_archive( 'mec-events' ) ) {
        echo '<div><h3>archive events page</h3></div>';
    }
}
add_action('mec_before_main_content','archive_mec_before_main_content');

We also suggest seeing the list of Conditional Tags used in this article. Refer to the link below.

https://codex.wordpress.org/Conditional_Tags

Share

Report Out Dated Content

If you think the content of this page does not reflect updated information, please let us know.

Report Now
Login Submit
0 Comments

No Comment.

Still no luck? We can help!

If you did not find what you were looking for, please submit a ticket in our support system.

Submit a Ticket
Webnus Banner
Modern Events Calendar

Please read our Terms and Conditions and Privacy Policy.

Review us on Trustpilot

Copyright © 2023. All rights reserved. Webnus Inc.