WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] change multi-select box to checkboxes for event categories (2 posts)

  1. greyhavns
    Member
    Posted 1 year ago #

    i would like the select box for categories on the event_form be displayed as checkboxes instead. can someone help?

    <select name="event_categories[]" multiple size="10">
    	<?php
    	$selected = $EM_Event->get_categories()->get_ids();
    	$walker = new EM_Walker_CategoryMultiselect();
    	$args_em = array( 'hide_empty' => 0, 'name' => 'event_categories[]', 'hierarchical' => true, 'id' => EM_TAXONOMY_CATEGORY, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'selected' => $selected, 'walker'=> $walker);
    	echo walk_category_dropdown_tree($categories, 0, $args_em);
    	?></select>

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

  2. agelonwl
    Member
    Posted 1 year ago #

    try to use wp_dropdown_categories

    e.g.
    wp_dropdown_categories(array( 'hide_empty' => 0, 'name' => 'category', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'selected' => $selected, 'show_option_none' => get_option('dbem_search_form_categories_label'), 'class'=>'em-events-search-category'));

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic