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 page (templates/taxonomy-mec-category.php)

  1. do_action('mec_before_main_content');
  2. do_action('mec_before_events_loop');
  3. do_action('mec_after_events_loop');
  4. do_action('mec_after_main_content');

 

Single page (templates/single-mec-events.php)

  1. do_action('mec_before_main_content');
  2. do_action('mec_after_main_content');

 

Archive (templates/archive-mec-events.php)

  1. do_action('mec_before_main_content');
  2. do_action('mec_before_events_loop');
  3. do_action('mec_after_events_loop');
  4. do_action('mec_after_main_content');

 

Shortcode Hooks

  1. do_action('mec_agenda_skin_head');
  2. do_action('mec_available_spot_skin_head');
  3. do_action('mec_carousel_skin_head');
  4. do_action('mec_countdown_skin_head');
  5. do_action('mec_cover_skin_head');
  6. do_action('mec_daily_skin_head');
  7. do_action('mec_full_skin_head');
  8. do_action('mec_grid_skin_head');
  9. do_action('mec_list_skin_head');
  10. do_action('mec_map_skin_head');
  11. do_action('mec_masonry_skin_head');
  12. do_action('mec_monthly_skin_head');
  13. do_action('mec_slider_skin_head');
  14. do_action('mec_timetable_skin_head');
  15. do_action('mec_weekly_skin_head');
  16. 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

0 Comments

No Comment.