Events Made Easy › Forums › Bug fixed or feature request implemented › Possible to exclude categories from [events_list] & [events_filterform]?
Tagged: #_EXCERPT, categories, event_filterform, events_list
- This topic has 9 replies, 4 voices, and was last updated 12 years ago by Anonymous.
-
AuthorPosts
-
Tue 22 Feb 2011 at 08:15 #42555AnonymousInactive
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.
Tue 22 Feb 2011 at 09:15 #46858FrankyKeymasternot possible yet. I’ll move this to feature request.
Tue 22 Feb 2011 at 23:09 #46859AnonymousInactiveThanks — 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.
Fri 25 Feb 2011 at 00:45 #46860AnonymousInactiveJust 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 theformat
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.Mon 7 Mar 2011 at 16:22 #46861AnonymousInactiveHi 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
Sun 20 Mar 2011 at 10:29 #46862FrankyKeymasterI 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.
Sun 14 Aug 2011 at 23:13 #46863FrankyKeymasterDone in trunk:
new option notcategory for shortcode [events_list]: works as the category option but serves to exclude categories
Mon 23 Apr 2012 at 17:18 #46864AnonymousInactiveFranky,
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
Mon 23 Apr 2012 at 21:21 #46865FrankyKeymasterAnd if you set the general setting “No events message” to empty?
Tue 24 Apr 2012 at 04:00 #46866AnonymousInactiveThat would work and TBH there’s never going to be no events – thanks
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.