Events Manager
[resolved] How to fix the category complusory in the event add page (4 posts)

  1. Gwentrac
    Posted 3 years ago #


    I would like to put the category selection complusory in my "Add events page".

    Do you know how I can do it?

    I tried to add the following code in the em-event.php file but it doesn't work.

    if( empty($this->event_categories) ){
    $this->add_error( sprintf(__("%s is required.", "dbem"), __('Your categorie,'dbem')) );}

    How can I get the categories selected when the user try to save his event?

    Best regards,



  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    you'd need to use PHP for this, you'd have to hook into e.g. em_event_save_meta which is called in classes/em-event.php

    and then add categories to the event that way, as we do in classes/em-category.php function save()

  3. Gwentrac
    Posted 3 years ago #

    Hello Marcus,

    Thanks for your help but I had not succeed!!! I tried different staff but ....I spend all my sunday morning... grrhh!

    Could you give me additional information?
    Could you detail your proposition "add categories to the event that way".

    Best regards,


  4. agelonwl
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic