• hey everyone,
    I modified the widget of AI1EC (code from agenda-widget-form.php) to add a limit to my new categories (event organizer and public). that’s work but i want now to don’t use JavaScript to replace by a drop down list in my wodrpress widget “new events” because the plugin Widget Wrangler doen’t like js.difficult to understand? say me!
    This is a part of code

    <p class=”ai1ec-limit-by-container”>
    Limiter:

    <!– Limit by Category –>
    par activite
    </p>

    <!– Limit by Category Select box –>
    <select id=”<?php echo $event_cat_ids[‘id’] ?>” class=”ai1ec-widget-cat-ids” name=”<?php echo $event_cat_ids[‘name’] ?>[]” >
    <option value=”<?php echo $event_cat_ids->term_id; ?>” selected> </option> i add option that’s select nothing
    <?php foreach( $event_cat_ids[‘options’] as $event_cat ): ?>
    <option value=”<?php echo $event_cat->term_id; ?>”<?php if( in_array( $event_cat->term_id, $event_cat_ids[‘value’] ) ) { ?> selected=”selected”<?php } ?>><?php echo $event_cat->name; ?></option>
    <?php endforeach ?>
    <?php if( count( $event_cat_ids[‘options’] ) == 0 ) : ?>
    <option disabled=”disabled”><?php _e( ‘No categories found.’, AI1EC_PLUGIN_NAME ) ?></option>
    <?php endif ?>
    </select>

    <p class=”ai1ec-limit-by-container”>
    <!– Limit by organisateur code courault –>
    par organisateur
    </p>

    <!– Limit by organisateur Select box code courault –>
    <select id=”<?php echo $event_org_ids[‘id’] ?>” class=”ai1ec-widget-org-ids” name=”<?php echo $event_org_ids[‘name’] ?>[]” >
    <option value=”<?php echo $event_org_ids->term_id; ?>” selected> </option>
    <?php foreach( $event_org_ids[‘options’] as $event_org ): ?>
    <option value=”<?php echo $event_org->term_id; ?>”<?php if( in_array( $event_org->term_id, $event_org_ids[‘value’] ) ) { ?> selected=”selected”<?php } ?>><?php echo $event_org->name; ?></option>
    <?php endforeach ?>
    <?php if( count( $event_org_ids[‘options’] ) == 0 ) : ?>
    <option disabled=”disabled”><?php _e( ‘No categories found.’, AI1EC_PLUGIN_NAME ) ?></option>
    <?php endif ?>
    </select>

    I need also to have and other field to check a box ‘ view all upcoming events’

    best regards,
    Ben

The topic ‘AI1EC dorp down list in widget’ is closed to new replies.