Event List
[resolved] Filter widget by category (5 posts)

  1. ellbiedesign
    Posted 1 year ago #

    I want to have multiple widgets in my sidebar and each one pulling a specific event category. Is this possible? Right now I can only get it to display events from all categories.


  2. MissEmmaLee
    Posted 1 year ago #

    I'm looking for this as well

  3. hilch
    Posted 1 year ago #

    First make a backup copy of widget.php.

    Then edit widget.php as follows:

    1. Find:
    'details_length' => array( 'type' => 'text',
    'std_value' => '0',
    'caption' => __( 'Truncate details to' ),
    'caption_after' => __( 'characters' ),
    'tooltip' => __( 'If the event details are diplayed this option specifies the number of diplayed characters. Set this value to 0 to view the full details.' ),
    'form_style' => 'margin:0 0 0.6em 0.9em',
    'form_width' => 30 ),

    Should be found at line 81.

    2. After, add:
    'cat_filter' => array( 'type' => 'text',
    'std_value' => 'none',
    'caption' => __( 'Category Filter:' ),
    'caption_after' => null,
    'tooltip' => __( 'This attribute specifies events of which categories are shown. The standard is "none" to show all events. Specify a category slug or a list of category slugs separated by a comma.' ),
    'form_style' => 'margin:0 0 0.4em 0',
    'form_width' => null ),

    3. Find:
    $shortcode .= ' details_length='.$instance['details_length'];
    Should now be found at line 164.

    4. After, add:
    $shortcode .= ' cat_filter='.$instance['cat_filter'];

    That's it. The widget now shows an input field for category slugs.

    Would be a good idea to include this in future releases of this plugin.

  4. mibuthu
    Plugin Author

    Posted 1 year ago #

    Thanks for the help, I will include it in the next version.

  5. mibuthu
    Plugin Author

    Posted 1 year ago #

    This is included in the new version 0.5.0.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Event List
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic