> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.webnus.net/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# MEC Hooks

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

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