Events Manager
[resolved] About public event form and categories select (5 posts)

  1. Christian
    Posted 3 years ago #


    I'm playing around with dedicated public event forms. Really easy !!!
    So for this I customise the templates in my theme.

    Just a trick for others that can help a lot :
    As I want to have specific forms, I use this trick to deploy differents templates.

    For example, I create in <mytheme> and plugins subdir, the following file:

    It contains (pseudo code):

    if (mycriteria === 'criteria1') {
    } else {

    And in my thep directory I created (from original event-editor.php) 2 files called mycriteria-event-editor.php and othercriteria-event-editor.php. Like this I can use many event templates forms.

    Here's for the trick but my problem concerns category selectboxes. I want, for one of my templates, list only all sub categories of a specific category. How can I do this in my temptates ?

    Thanks for your help!



  2. agelonwl
    Posted 3 years ago #


    try template file at wp-content/plugins/events-manager/templates/forms/event/categories-public.php

    to use templates: http://wp-events-plugin.com/documentation/using-template-files/

    also, you can see some sample snippet here - http://pastebin.com/uLEak8Q5

  3. Christian
    Posted 3 years ago #

    Thanks agelonwl,

    I've just to add the required term for my parent category here:

    $categories = EM_Categories::get(array('orderby'=>'name','hide_empty'=>0));

    Right and it should do the trick ?

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    you probably want to look at templates/forms/event/public-categories.php and edit that instead, youd tweak the $args_em line

  5. Christian
    Posted 3 years ago #

    Done !!! Thanks

    My needs was to list all sub categories of en event cat.

    In my specific template, I change only the EM_Categories call with

    $categories = EM_Categories::get(array('orderby'=>'name','hide_empty'=>0,'child_of'=>get_term_by('slug', MY_SLUG, EM_TAXONOMY_CATEGORY)->term_id));`

    And all is working as expected.

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic


No tags yet.