WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. ellbiedesign
    Member
    Posted 10 months 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.

    http://wordpress.org/plugins/event-list/

  2. MissEmmaLee
    Member
    Posted 10 months ago #

    I'm looking for this as well

  3. hilch
    Member
    Posted 9 months 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
    Member
    Plugin Author

    Posted 9 months ago #

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

  5. mibuthu
    Member
    Plugin Author

    Posted 9 months ago #

    This is included in the new version 0.5.0.

Reply

You must log in to post.

About this Plugin

About this Topic