Events Made Easy Forums Bug fixed or feature request implemented Possible to exclude categories from [events_list] & [events_filterform]?

  • This topic has 9 replies, 4 voices, and was last updated 12 years ago by Anonymous.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #42555
    Anonymous
    Inactive

    Hi all,

    First off thank you Franky for the great plugin and fantastic support. I’ve already found the answers to loads of questions on these forums.

    I want to maintain two separate event lists — all future events from category ID 1 on one page, and all future events from the other categories (2-6 at this stage, and the list may grow longer as the client uses the site) on another.

    So two related questions I guess:

    1. Is it possible to do something like [events_list category=-1] (or <>1, !=1, etc) to exclude a specific category instead of explicitly including all the others (and adding to the list of categories when new ones are created) as I’m currently doing (i.e. [events_list category=2,3,4,5,6]?

    2. And then, can I exclude category 1 from the [event_filterform] element on this page?

    Thanks.

    #46858
    Franky
    Keymaster

    not possible yet. I’ll move this to feature request.

    #46859
    Anonymous
    Inactive

    Thanks — it’s not urgent, for the time being I’ll just do something like

    [events_list category=2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]

    to cover current categories and leave a bit of headroom for future ones.

    #46860
    Anonymous
    Inactive

    Just realised that my workaround solution described above fails if, in my setup, an event is in both category 1 and 2.

    When started this thread I hadn’t counted on events in category 1 being in other categories too, but as I work on the project I’m realising that this may not always be the case.

    Meanwhile I think I’ll be able to use a combination of a custom page template, eme_get_events_list with the format attribute, and a something like:

    [events_if tag='#ESC_CATEGORIES' contains='1']
    <!-- Display nothing at all for this event -->
    [/events_if]

    [events_if tag='#ESC_CATEGORIES' notcontains='1']
    <!-- Desired formatting for my events go here -->
    [/events_if]

    A bit untidy, but I think it’ll work (in my situation at least)! I’ll let you know.

    Update: Works as expected! But the category needs to be mentioned by name in the shortcode, not ID, i.e.

    [events_if tag='#ESC_CATEGORIES' contains='My First Category']

    A biggish caveat for this workaround, though is that I can’t use [events_filterform] to filter the events displayed, as all the EME formatting code is in the page template code, not the page content.

    #46861
    Anonymous
    Inactive

    Hi Franky,

    Please see if you can get the exclusion of categories in the up coming release. We love your plugin but we have over 50 categories in various combinations including some in none. Without the ability to exclude categories it makes it impossible for us to properly organize our over 250 nation events.

    Thank YOU for the Greatest Support I have found on for a WordPress Plugin to date!

    -Robert

    #46862
    Franky
    Keymaster

    I just thought about this: you can use a filter for that: http://www.e-dynamics.be/wordpress/?cat=41

    In your case: eme_event_list_filter. But don’t do paging then, it might give weird results.

    #46863
    Franky
    Keymaster

    Done in trunk:

    new option notcategory for shortcode [events_list]: works as the category option but serves to exclude categories

    #46864
    Anonymous
    Inactive

    Franky,

    I’m using the above but I want to stop getting a No Events error if there’s no events in the first instance.

    I tried using the following but couldn’t get it to work:

    [events_if tag='#ESC_CATEGORY' contains='13']

    [events_list limit=5 category=13]

    [/events_if]

    [events_list limit=5 notcategory=13]

    Basically the following would work if I had events in category 13

    [events_list limit=5 category=13]

    [events_list limit=5 notcategory=13]

    Thanks

    Tom

    #46865
    Franky
    Keymaster

    And if you set the general setting “No events message” to empty?

    #46866
    Anonymous
    Inactive

    That would work and TBH there’s never going to be no events – thanks

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top