# MEC Hooks

> List of Modern Events Calendar action and filter hooks for single event, archive, category and shortcode templates, with examples.

Source: https://webnus.net/dox/modern-events-calendar/mec-hooks/
Last updated: 2026-11-17

You can find all of the [MEC](https://webnus.net/) Hooks action and filter hooks for interacting with another piece of code in the following list:

## Category Taxonomy MEC Hooks {#Category\_Taxonomy\_MEC\_Hooks}

templates/taxonomy-mec-category.php

```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 {#\_Single\_page}

templates/single-mec-events.php

```php
do_action('mec_before_main_content');

do_action('mec_after_main_content');
```

## Archive {#Archive}

templates/archive-mec-events.php

```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 {#Shortcode\_Hooks}

```php
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 {#A\_few\_examples}

### MEC single page {#MEC\_single\_page}

```php
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 {#MEC\_archive\_page}

```php
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](https://codex.wordpress.org/Conditional_Tags)
