WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] adjust [event_form] page? (12 posts)

  1. knireis
    Member
    Posted 1 year ago #

    Can i adjust the [event_form] page somewhere? I would like users to be able to add events, but only for a certain category and location.

    http://wordpress.org/extend/plugins/events-manager/

  2. angelo
    NetWebLogic Support
    Posted 1 year ago #

    yes, you can modify template file at wp-content/plugins/events-manager/templates/forms/event-editor.php

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

  3. knireis
    Member
    Posted 1 year ago #

    that works, thanks but i'm not good at this stuff. I can find the lines about the categories:

    <div class="event-extra-details">
    <?php if(get_option('dbem_attributes_enabled')) { em_locate_template('forms/event/attributes-public.php',true); }  ?>
    <?php if(get_option('dbem_categories_enabled')) { em_locate_template('forms/event/categories-public.php',true); }  ?>
    </div>

    How do i cange this so only certain (or just 1) categories are visible for selection?

  4. angelo
    NetWebLogic Support
    Posted 1 year ago #

    you need to modify forms/event/categories-public.php e.g. add 'exclude'=>'2,3' where 2,3 is your event categories id

  5. knireis
    Member
    Posted 1 year ago #

    I added exclude to the args line:

    $args_em = array( 'hide_empty' => 0, 'name' => 'event_categories[]', 'hierarchical' => true, 'exclude'=>'15,16,18', 'id' => EM_TAXONOMY_CATEGORY, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'selected' => $selected, 'walker'=> $walker);

    But they still show up.

  6. angelo
    NetWebLogic Support
    Posted 1 year ago #

    on your snippet above; remove this 'exclude'=>'15,16,18' and then paste it here

    $categories = EM_Categories::get(array('orderby'=>'name','hide_empty'=>0, 'exclude'=>'15,16,18'));
  7. knireis
    Member
    Posted 1 year ago #

    Thanks, one last question, where can i set to exclude a categorie from the 'eventlist' page?

  8. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

  9. knireis
    Member
    Posted 1 year ago #

    On which line do copy the $args['category'] = 15,16,18;?

    I tried several options but give an parse error

  10. philipjohn
    Member
    Posted 1 year ago #

    As per Angelo's suggestion above, you'll need to change that code slightly and add it into the EM_Categories::get() call.

    Phil

  11. knireis
    Member
    Posted 1 year ago #

    Thank you, but my last question was about where to put the code ($args['category'] = 15,16,18;) in the event-list.php in order to display only events from these categories in the event-list page.

  12. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    add it to line 17 just above:

    $events_count = EM_Events::count...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.