Skip to main content

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:

Hakan Turan avatar
Written by Hakan Turan
Updated over 10 months ago

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

1

2

3

4

5

6

7

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

1

2

3

do_action('mec_before_main_content');

do_action('mec_after_main_content');

Archive

templates/archive-mec-events.php

1

2

3

4

5

6

7

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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

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

1

2

3

4

5

6

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

1

2

3

4

5

6

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.

Did this answer your question?